* [PUSHED] gdb/testsuite: fix duplicate test names in gdb.base/cond-eval-mode.exp
@ 2024-02-01 10:08 Andrew Burgess
0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2024-02-01 10:08 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
Fix some duplicate test names in gdb.base/cond-eval-mode.exp when
running with native-gdbserver or native-extended-gdbserver board
files.
I've just added some 'with_test_prefix' blocks to make the test names
unique, there should be no change in what is tested after this commit.
---
gdb/testsuite/gdb.base/cond-eval-mode.exp | 104 ++++++++++++----------
1 file changed, 56 insertions(+), 48 deletions(-)
diff --git a/gdb/testsuite/gdb.base/cond-eval-mode.exp b/gdb/testsuite/gdb.base/cond-eval-mode.exp
index 52f73ba13b5..cd1b78bf2ab 100644
--- a/gdb/testsuite/gdb.base/cond-eval-mode.exp
+++ b/gdb/testsuite/gdb.base/cond-eval-mode.exp
@@ -83,39 +83,43 @@ proc test_break { break_command } {
with_test_prefix "$break_command" {
delete_breakpoints
- gdb_test "$break_command foo" "reakpoint.* at .*"
-
- # A condition that evals true.
- gdb_test "condition \$bpnum cond_global==0" ".*"
-
- set can_do_cmd 0
-
- set test "continue"
- gdb_test_multiple $test $test {
- -re "You may have requested too many.*$gdb_prompt $" {
- pass $test
+ with_test_prefix "true condition" {
+ gdb_test "$break_command foo" "reakpoint.* at .*"
+
+ # A condition that evals true.
+ gdb_test "condition \$bpnum cond_global==0" ".*"
+
+ set can_do_cmd 0
+
+ set test "continue"
+ gdb_test_multiple $test $test {
+ -re "You may have requested too many.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "Breakpoint .*, foo .*$gdb_prompt $" {
+ pass $test
+ set can_do_cmd 1
+ }
}
- -re "Breakpoint .*, foo .*$gdb_prompt $" {
- pass $test
- set can_do_cmd 1
- }
- }
- if { !$can_do_cmd } {
- unsupported "no target support"
- return
+ if { !$can_do_cmd } {
+ unsupported "no target support"
+ return
+ }
}
- delete_breakpoints
+ with_test_prefix "false condition" {
+ delete_breakpoints
- gdb_test "$break_command foo" ".*reakpoint .* at .*"
+ gdb_test "$break_command foo" ".*reakpoint .* at .*"
- # A condition that evals false.
- gdb_test "condition \$bpnum cond_global==1" ".*"
+ # A condition that evals false.
+ gdb_test "condition \$bpnum cond_global==1" ".*"
- gdb_test "b bar" "Breakpoint .* at .*"
+ gdb_test "b bar" "Breakpoint .* at .*"
- gdb_test "continue" "Breakpoint .*, bar .*"
+ gdb_test "continue" "Breakpoint .*, bar .*"
+ }
}
}
@@ -132,41 +136,45 @@ proc test_watch { watch_command } {
return
}
- delete_breakpoints
+ with_test_prefix "true condition" {
+ delete_breakpoints
- gdb_test "$watch_command global" ".*atchpoint .*: global.*"
+ gdb_test "$watch_command global" ".*atchpoint .*: global.*"
- # A condition that evals true.
- gdb_test "condition \$bpnum cond_global==0" ".*"
+ # A condition that evals true.
+ gdb_test "condition \$bpnum cond_global==0" ".*"
- set can_do_cmd 0
+ set can_do_cmd 0
- set test "continue"
- gdb_test_multiple $test $test {
- -re "You may have requested too many.*$gdb_prompt $" {
- pass $test
- }
- -re "atchpoint .*: global.*$gdb_prompt $" {
- pass $test
- set can_do_cmd 1
+ set test "continue"
+ gdb_test_multiple $test $test {
+ -re "You may have requested too many.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "atchpoint .*: global.*$gdb_prompt $" {
+ pass $test
+ set can_do_cmd 1
+ }
}
- }
- if { !$can_do_cmd } {
- unsupported "no target support"
- return
+ if { !$can_do_cmd } {
+ unsupported "no target support"
+ return
+ }
}
- delete_breakpoints
+ with_test_prefix "false condition" {
+ delete_breakpoints
- gdb_test "$watch_command global" ".*atchpoint .*: global.*"
+ gdb_test "$watch_command global" ".*atchpoint .*: global.*"
- # A condition that evals false.
- gdb_test "condition \$bpnum cond_global==1" ".*"
+ # A condition that evals false.
+ gdb_test "condition \$bpnum cond_global==1" ".*"
- gdb_test "b bar" "Breakpoint .* at .*"
+ gdb_test "b bar" "Breakpoint .* at .*"
- gdb_test "continue" "Breakpoint .*, bar .*"
+ gdb_test "continue" "Breakpoint .*, bar .*"
+ }
}
}
base-commit: 49346fa79442ba6f0be832c2c5af4360e52f070a
--
2.25.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-01 10:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-01 10:08 [PUSHED] gdb/testsuite: fix duplicate test names in gdb.base/cond-eval-mode.exp Andrew Burgess
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).