aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/ena-dis-br.exp
diff options
context:
space:
mode:
authorLuis Machado <luis.machado@linaro.org>2020-05-25 13:25:50 -0300
committerLuis Machado <luis.machado@linaro.org>2020-05-27 09:24:09 -0300
commitc2b750436a9db8cf491ddeb316bc71e4b65110b6 (patch)
tree165e1ef0ce74433f818a2e26aa2b0aafe340c664 /gdb/testsuite/gdb.base/ena-dis-br.exp
parenta6dbf402de65fe66f4ec99b56527dfd00d077cb6 (diff)
downloadgdb-c2b750436a9db8cf491ddeb316bc71e4b65110b6.zip
gdb-c2b750436a9db8cf491ddeb316bc71e4b65110b6.tar.gz
gdb-c2b750436a9db8cf491ddeb316bc71e4b65110b6.tar.bz2
Fix some duplicate test names
While doing a testsuite run on aarch64-linux, I noticed a bunch of duplicated test name results. It annoyed me a little, so I decided to go ahead and fix the worst offenders. The following patch brings the duplicate test names down from 461 to 137. The remaining ones are mostly scattered across the testsuite, with 1 to 3 duplicates per testcase. We can fix those as we go. gdb/testsuite/ChangeLog: 2020-05-27 Luis Machado <luis.machado@linaro.org> * gdb.arch/aarch64-sighandler-regs.exp: Fix duplicated test names. * gdb.arch/aarch64-tagged-pointer.exp: Likewise. * gdb.arch/arm-disassembler-options.exp: Likewise. * gdb.arch/arm-disp-step.exp: Likewise. * gdb.arch/thumb-prologue.exp: Likewise. * gdb.base/async.exp: Likewise. * gdb.base/auxv.exp: Likewise. * gdb.base/complex-parts.exp: Likewise. * gdb.base/ena-dis-br.exp: Likewise. * gdb.base/foll-exec.exp: Likewise. * gdb.base/permissions.exp: Likewise. * gdb.base/relocate.exp: Likewise. * gdb.base/return2.exp: Likewise. * gdb.base/sigbpt.exp: Likewise. * gdb.base/siginfo-obj.exp: Likewise. * gdb.cp/converts.exp: Likewise. * gdb.cp/exceptprint.exp: Likewise. * gdb.cp/inherit.exp: Likewise. * gdb.cp/nsnoimports.exp: Likewise. * gdb.cp/virtbase2.exp: Likewise. * gdb.mi/mi-var-cmd.exp: Likewise. * gdb.mi/var-cmd.c: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.base/ena-dis-br.exp')
-rw-r--r--gdb/testsuite/gdb.base/ena-dis-br.exp57
1 files changed, 45 insertions, 12 deletions
diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp
index c338a0d..d43e47e 100644
--- a/gdb/testsuite/gdb.base/ena-dis-br.exp
+++ b/gdb/testsuite/gdb.base/ena-dis-br.exp
@@ -48,7 +48,7 @@ proc break_at { breakpoint where } {
gdb_test_multiple "$test" "$test" {
-re "Breakpoint (\[0-9\]*) at .*$where.*$gdb_prompt $" {
set bp $expect_out(1,string)
- pass "$test"
+ pass $gdb_test_name
}
}
return $bp
@@ -104,7 +104,12 @@ gdb_test "info break $bp" \
# Verify that we don't stop at a disabled breakpoint.
gdb_continue_to_end "no stop"
-rerun_to_main
+
+set count 1
+with_test_prefix "run $count" {
+ rerun_to_main
+ incr count
+}
gdb_continue_to_end "no stop at auto-disabled break marker2"
# Verify that we can set a breakpoint to be self-deleting after the
@@ -149,7 +154,9 @@ if ![runto_main] then {
set bp [break_at $bp_location7 "line $bp_location7"]
-set bp2 [break_at marker1 " line $bp_location15"]
+with_test_prefix "enable count" {
+ set bp2 [break_at marker1 " line $bp_location15"]
+}
gdb_test "enable count" \
"Argument required \\(hit count\\)\\." \
@@ -181,7 +188,9 @@ if ![runto_main] then {
fail "enable/disable break tests suppressed"
}
-set bp [break_at "marker1" " line $bp_location15.*"]
+with_test_prefix "ignore count" {
+ set bp [break_at "marker1" " line $bp_location15.*"]
+}
# Verify that an ignore of a non-existent breakpoint is gracefully
# handled.
@@ -216,7 +225,11 @@ gdb_test "info break $bp" \
"info ignored break marker1"
gdb_continue_to_end "no stop at ignored break marker1"
-rerun_to_main
+
+with_test_prefix "run $count" {
+ rerun_to_main
+ incr count
+}
# See the comments in condbreak.exp for "run until breakpoint at marker1"
# for an explanation of the xfail below.
@@ -236,7 +249,9 @@ if ![runto_main] then {
fail "enable/disable break tests suppressed"
}
-set bp [break_at marker1 " line $bp_location15.*"]
+with_test_prefix "ignore count and auto-delete" {
+ set bp [break_at marker1 " line $bp_location15.*"]
+}
gdb_test "ignore $bp 1" \
"Will ignore next crossing of breakpoint \[0-9\]*.*" \
@@ -249,7 +264,11 @@ gdb_test "info break $bp" \
"info break marker1 after hitting breakpoint"
gdb_continue_to_end "no stop at ignored & auto-deleted break marker1"
-rerun_to_main
+
+with_test_prefix "run $count" {
+ rerun_to_main
+ incr count
+}
gdb_test "continue" \
".*marker1 .*:$bp_location15.*" \
@@ -262,7 +281,9 @@ if ![runto_main] then {
fail "enable/disable break tests suppressed"
}
-set bp [break_at marker1 " line $bp_location15"]
+with_test_prefix "disabled breakpoint ignore count" {
+ set bp [break_at marker1 " line $bp_location15"]
+}
gdb_test "ignore $bp 10" \
"Will ignore next 10 crossings of breakpoint \[0-9\]*.*" \
@@ -271,7 +292,10 @@ gdb_test "ignore $bp 10" \
gdb_test_no_output "disable $bp" "disable break marker1"
gdb_continue_to_end "no stop at ignored & disabled break marker1"
-rerun_to_main
+
+with_test_prefix "run $count" {
+ rerun_to_main
+}
gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*ignore next 10 hits.*" \
@@ -315,9 +339,18 @@ set b2 0
set b3 0
set b4 0
set b1 [break_at main ""]
-set b2 [break_at main ""]
-set b3 [break_at main ""]
-set b4 [break_at main ""]
+
+with_test_prefix "2nd breakpoint" {
+ set b2 [break_at main ""]
+}
+
+with_test_prefix "3rd breakpoint" {
+ set b3 [break_at main ""]
+}
+
+with_test_prefix "4th breakpoint" {
+ set b4 [break_at main ""]
+}
# Perform tests for disable/enable commands on multiple
# locations and breakpoints.