aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-04-15 14:45:47 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-04-15 14:45:47 -0400
commit41f14dc86235e2685ee863e0b979309cdcaa6f72 (patch)
treee9a3a0a9ce5f190744edf6295c886c68a624e831 /gdb
parenta15a276b46bf07323a1d270d7abece83ef1ea78f (diff)
downloadgdb-41f14dc86235e2685ee863e0b979309cdcaa6f72.zip
gdb-41f14dc86235e2685ee863e0b979309cdcaa6f72.tar.gz
gdb-41f14dc86235e2685ee863e0b979309cdcaa6f72.tar.bz2
gdb/testsuite: use foreach_with_prefix in gdb.threads/fork-plus-threads.exp
I noticed that using foreach_with_prefix could make things a bit less verbose. No changes in behavior expected. gdb/testsuite/ChangeLog: * gdb.threads/fork-plus-threads.exp: Use foreach_with_prefix. Change-Id: I06aa6e3d10a9cfb6ada11547aefe8c70b636ac81
Diffstat (limited to 'gdb')
-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}
}