diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-04-15 14:45:47 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-04-15 14:45:47 -0400 |
commit | 41f14dc86235e2685ee863e0b979309cdcaa6f72 (patch) | |
tree | e9a3a0a9ce5f190744edf6295c886c68a624e831 /gdb/testsuite/gdb.threads | |
parent | a15a276b46bf07323a1d270d7abece83ef1ea78f (diff) | |
download | gdb-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/testsuite/gdb.threads')
-rw-r--r-- | gdb/testsuite/gdb.threads/fork-plus-threads.exp | 10 |
1 files changed, 4 insertions, 6 deletions
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} } |