aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.threads/fork-plus-threads.exp10
2 files changed, 8 insertions, 6 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d1b6f5c..9de1a44 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * gdb.threads/fork-plus-threads.exp: Use foreach_with_prefix.
+
2021-04-15 Tom Tromey <tromey@adacore.com>
* gdb.dwarf2/arr-stride.exp: Add test.
diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
index 1750261..f5cfb27 100644
--- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp
+++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
@@ -29,7 +29,7 @@ if { [target_info exists gdb_protocol]
standard_testfile
-proc do_test { detach_on_fork } {
+proc do_test { detach-on-fork } {
global GDBFLAGS
global srcfile testfile
global gdb_prompt
@@ -50,7 +50,7 @@ proc do_test { detach_on_fork } {
return 0
}
- gdb_test_no_output "set detach-on-fork $detach_on_fork"
+ gdb_test_no_output "set detach-on-fork ${detach-on-fork}"
set test "continue &"
gdb_test_multiple $test $test {
-re "$gdb_prompt " {
@@ -113,8 +113,6 @@ proc do_test { detach_on_fork } {
"only inferior 1 left"
}
-foreach detach_on_fork {"on" "off"} {
- with_test_prefix "detach-on-fork=$detach_on_fork" {
- do_test $detach_on_fork
- }
+foreach_with_prefix detach-on-fork {"on" "off"} {
+ do_test ${detach-on-fork}
}