aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLancelot SIX <lsix@lancelotsix.com>2021-11-21 15:34:09 +0000
committerLancelot SIX <lsix@lancelotsix.com>2022-01-07 22:43:34 +0000
commitc6336a6db001c10383376b762262ca8f953d65c2 (patch)
tree5196c97de031f6363be512838e14c63013260195
parent8cc261b7814cdd04735be2e7af1fafc19df1b3b6 (diff)
downloadbinutils-c6336a6db001c10383376b762262ca8f953d65c2.zip
binutils-c6336a6db001c10383376b762262ca8f953d65c2.tar.gz
binutils-c6336a6db001c10383376b762262ca8f953d65c2.tar.bz2
gdb/testsuite: Remove duplicates from gdb.base/nested-subp2.exp
When running the testsuite, I have: Running .../gdb/testsuite/gdb.base/nested-subp2.exp ... DUPLICATE: gdb.base/nested-subp2.exp: continue to the STOP marker DUPLICATE: gdb.base/nested-subp2.exp: print c DUPLICATE: gdb.base/nested-subp2.exp: print count Fix by using with_test_prefix to differentiate the test that are performed at different points during the execution of the debuggee. Tested on x86_64-linux.
-rw-r--r--gdb/testsuite/gdb.base/nested-subp2.exp28
1 files changed, 15 insertions, 13 deletions
diff --git a/gdb/testsuite/gdb.base/nested-subp2.exp b/gdb/testsuite/gdb.base/nested-subp2.exp
index 3a187a5..876b797 100644
--- a/gdb/testsuite/gdb.base/nested-subp2.exp
+++ b/gdb/testsuite/gdb.base/nested-subp2.exp
@@ -49,21 +49,23 @@ set bp_location [gdb_get_line_number "STOP" "${testcase}.c"]
gdb_test "break ${testcase}.c:${bp_location}" \
"Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \
"breakpoint to the STOP marker"
-gdb_test "continue" \
- "Breakpoint \[0-9\]+, increment .*" \
- "continue to the STOP marker"
+with_test_prefix "stop at first iteration" {
+ gdb_test "continue" \
+ "Breakpoint \[0-9\]+, increment .*" \
+ "continue to the STOP marker"
-# Check we get correct values for both local and non-local variable references.
-
-gdb_test "print c" "102 'f'"
-gdb_test "print count" "0"
+ # Check we get correct values for both local and non-local variable references.
+ gdb_test "print c" "102 'f'"
+ gdb_test "print count" "0"
+}
# Same but a little later: make sure we were looking at the proper places.
-
-gdb_test "continue" \
- "Breakpoint \[0-9\]+, increment .*" \
- "continue to the STOP marker"
-gdb_test "print c" "111 'o'"
-gdb_test "print count" "1"
+with_test_prefix "stop at second iteration" {
+ gdb_test "continue" \
+ "Breakpoint \[0-9\]+, increment .*" \
+ "continue to the STOP marker"
+ gdb_test "print c" "111 'o'"
+ gdb_test "print count" "1"
+}