diff options
author | Pedro Alves <palves@redhat.com> | 2012-02-21 21:55:39 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-02-21 21:55:39 +0000 |
commit | 6a5870cea1620f9309c730a1dd97afac8ca2f8ed (patch) | |
tree | eb0cba7d00a91ce406316ab4e6b22c711d3888b0 /gdb/testsuite/gdb.threads | |
parent | b54a8fd70210fd1fc7b4f41c4679737066951033 (diff) | |
download | gdb-6a5870cea1620f9309c730a1dd97afac8ca2f8ed.zip gdb-6a5870cea1620f9309c730a1dd97afac8ca2f8ed.tar.gz gdb-6a5870cea1620f9309c730a1dd97afac8ca2f8ed.tar.bz2 |
2012-02-21 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com>
* lib/gdb.exp: Add description of test prefixes.
(with_test_prefix): New procedure.
* gdb.arch/altivec-abi.exp: Use with_test_prefix.
* gdb.base/attach-pie-misread.exp: Use with_test_prefix.
* gdb.base/break-interp.exp: Use with_test_prefix. Use append
instead of lappend to append to pf_prefix.
* gdb.base/catch-load.exp: Use with_test_prefix.
* gdb.base/disp-step-syscall.exp: Use with_test_prefix.
* gdb.base/jit-so.exp: Use with_test_prefix.
* gdb.base/jit.exp: Use with_test_prefix.
* gdb.base/return-nodebug.exp (do_test): Use append instead of
lappend to append to pf_prefix.
* gdb.base/sepdebug.exp: Use with_test_prefix.
* gdb.base/solib-display.exp: Use with_test_prefix.
* gdb.base/solib-overlap.exp: Use with_test_prefix.
* gdb.base/watch-cond-infcall.exp: Use with_test_prefix.
* gdb.base/watchpoint.exp: Use with_test_prefix.
* gdb.dwarf2/dw2-noloc.exp: Use with_test_prefix.
* gdb.mi/mi-watch.exp: Use with_test_prefix.
* gdb.mi/mi2-watch.exp: Use with_test_prefix.
* gdb.threads/non-ldr-exc-1.exp: Use with_test_prefix.
* gdb.threads/non-ldr-exc-2.exp: Use with_test_prefix.
* gdb.threads/non-ldr-exc-3.exp: Use with_test_prefix.
* gdb.threads/non-ldr-exc-4.exp: Use with_test_prefix.
* gdb.threads/watchpoint-fork.exp: Use with_test_prefix. Use
append instead of lappend to append to pf_prefix.
* gdb.threads/watchthreads-reorder.exp: Use with_test_prefix.
* gdb.trace/change-loc.exp: Use with_test_prefix.
* gdb.trace/pending.exp: Use with_test_prefix.
* gdb.trace/status-stop.exp: Use with_test_prefix.
* gdb.trace/strace.exp: Use with_test_prefix.
* gdb.trace/trace-break.exp: Use with_test_prefix.
* gdb.trace/unavailable.exp: Use with_test_prefix. Use append
instead of lappend to append to pf_prefix.
Diffstat (limited to 'gdb/testsuite/gdb.threads')
-rw-r--r-- | gdb/testsuite/gdb.threads/non-ldr-exc-1.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/non-ldr-exc-2.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/non-ldr-exc-3.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/non-ldr-exc-4.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/watchpoint-fork.exp | 20 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/watchthreads-reorder.exp | 10 |
6 files changed, 17 insertions, 57 deletions
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp index 8a14129..c6ced8e 100644 --- a/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp +++ b/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp @@ -30,17 +30,12 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab return -1 } -proc do_test { lock_sched } { - global pf_prefix +proc do_test { lock_sched } { with_test_prefix " lock-sched$lock_sched:" { global executable - set save_pf_prefix $pf_prefix - lappend pf_prefix "lock-sched$lock_sched:" - clean_restart ${executable} if ![runto_main] { - set pf_prefix $save_pf_prefix return -1 } @@ -57,9 +52,7 @@ proc do_test { lock_sched } { gdb_test "continue" \ ".*is executing new program.*Breakpoint 1, main.* at .*" \ "continue over exec" - - set pf_prefix $save_pf_prefix -} +}} do_test 0 do_test 1 diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp index 5404ef4..66f090a 100644 --- a/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp +++ b/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp @@ -31,17 +31,12 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab return -1 } -proc do_test { lock_sched } { - global pf_prefix +proc do_test { lock_sched } { with_test_prefix " lock-sched$lock_sched:" { global executable - set save_pf_prefix $pf_prefix - lappend pf_prefix "lock-sched$lock_sched:" - clean_restart ${executable} if ![runto_main] { - set pf_prefix $save_pf_prefix return -1 } @@ -62,9 +57,7 @@ proc do_test { lock_sched } { gdb_test "continue" \ ".*is executing new program.*Breakpoint 1, main.* at .*" \ "continue over exec" - - set pf_prefix $save_pf_prefix -} +}} do_test 0 do_test 1 diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp index 9c82c2a..83d243f 100644 --- a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp +++ b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp @@ -33,17 +33,12 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab return -1 } -proc do_test { lock_sched } { - global pf_prefix +proc do_test { lock_sched } { with_test_prefix " lock-sched$lock_sched:" { global executable - set save_pf_prefix $pf_prefix - lappend pf_prefix "lock-sched$lock_sched:" - clean_restart ${executable} if ![runto_main] { - set pf_prefix $save_pf_prefix return -1 } @@ -60,9 +55,7 @@ proc do_test { lock_sched } { gdb_test "continue" \ ".*is executing new program.*Breakpoint 1, main.* at .*" \ "continue over exec" - - set pf_prefix $save_pf_prefix -} +}} do_test 0 do_test 1 diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp index 943b077..7fce0ef 100644 --- a/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp +++ b/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp @@ -32,17 +32,12 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab return -1 } -proc do_test { lock_sched } { - global pf_prefix +proc do_test { lock_sched } { with_test_prefix " lock-sched$lock_sched:" { global executable - set save_pf_prefix $pf_prefix - lappend pf_prefix "lock-sched$lock_sched:" - clean_restart ${executable} if ![runto_main] { - set pf_prefix $save_pf_prefix return -1 } @@ -59,9 +54,7 @@ proc do_test { lock_sched } { gdb_test "continue" \ ".*is executing new program.*Breakpoint 1, main.* at .*" \ "continue over exec" - - set pf_prefix $save_pf_prefix -} +}} do_test 0 do_test 1 diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork.exp b/gdb/testsuite/gdb.threads/watchpoint-fork.exp index 814fb02..db05e1f 100644 --- a/gdb/testsuite/gdb.threads/watchpoint-fork.exp +++ b/gdb/testsuite/gdb.threads/watchpoint-fork.exp @@ -22,21 +22,15 @@ if [is_remote target] { return } -proc test {type symbol} { - global testfile objdir subdir srcdir gdb_prompt - - global pf_prefix - set prefix_test $pf_prefix - lappend pf_prefix "$type:" - set prefix_mt $pf_prefix +proc test {type symbol} { with_test_prefix " $type:" { + global testfile objdir subdir srcdir gdb_prompt pf_prefix set srcfile_type ${srcdir}/${subdir}/${testfile}-${type}.c - # no threads - set pf_prefix $prefix_mt - lappend pf_prefix "singlethreaded:" + set prefix_test $pf_prefix + append pf_prefix " singlethreaded:" set executable ${testfile}-${type}-st set srcfile_main ${srcdir}/${subdir}/${testfile}-st.c @@ -98,8 +92,8 @@ proc test {type symbol} { return } - set pf_prefix $prefix_mt - lappend pf_prefix "multithreaded:" + set pf_prefix $prefix_test + append pf_prefix " multithreaded:" set executable ${testfile}-${type}-mt set srcfile_main ${srcdir}/${subdir}/${testfile}-mt.c @@ -151,7 +145,7 @@ proc test {type symbol} { # cleanup set pf_prefix $prefix_test -} +}} test parent FOLLOW_PARENT diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp index f620c07..ab4cd5f 100644 --- a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp +++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp @@ -38,11 +38,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable return -1 } -foreach reorder {0 1} { - - global pf_prefix - set prefix_test $pf_prefix - lappend pf_prefix "reorder$reorder:" +foreach reorder {0 1} { with_test_prefix " reorder$reorder:" { clean_restart $testfile @@ -97,6 +93,4 @@ foreach reorder {0 1} { gdb_test "set debug infrun 1" gdb_continue_to_breakpoint "break-at-exit" ".*break-at-exit.*" - - set pf_prefix $prefix_test -} +}} |