diff options
29 files changed, 111 insertions, 68 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c8b9857..2f184bf 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,4 +1,40 @@ 2012-02-21 Pedro Alves <palves@redhat.com> + + * gdb.arch/altivec-abi.exp (altivec_abi_tests): Don't do + with_test_prefix here. + (top level): Do it here instead. Remove `:' from the + with_test_prefix string. + * gdb.base/attach-pie-misread.exp: Remove the leading space the + the suffix `:' from the with_test_prefix prefix string. + * gdb.base/break-interp.exp: Ditto. + * gdb.base/catch-load.exp: Ditto. + * gdb.base/disp-step-syscall.exp: Ditto. + * gdb.base/jit-so.exp: Ditto. + * gdb.base/jit.exp: Ditto. + * gdb.base/sepdebug.exp: Ditto. + * gdb.base/solib-display.exp: Ditto. + * gdb.base/solib-overlap.exp: Ditto. + * gdb.base/watch-cond-infcall.exp: Ditto. + * gdb.base/watchpoint.exp: Ditto. + * gdb.dwarf2/dw2-noloc.exp: Ditto. + * gdb.mi/mi-watch.exp: Ditto. + * gdb.mi/mi2-watch.exp: Ditto. + * gdb.threads/non-ldr-exc-1.exp: Ditto. + * gdb.threads/non-ldr-exc-2.exp: Ditto. + * gdb.threads/non-ldr-exc-3.exp: Ditto. + * gdb.threads/non-ldr-exc-4.exp: Ditto. + * gdb.threads/watchpoint-fork.exp: Ditto. + * gdb.threads/watchthreads-reorder.exp: Ditto. + * gdb.trace/change-loc.exp: Ditto. + * gdb.trace/pending.exp: Ditto. + * gdb.trace/status-stop.exp: Ditto. + * gdb.trace/strace.exp: Ditto. + * gdb.trace/trace-break.exp: Ditto. + * gdb.trace/unavailable.exp: Ditto. + * lib/gdb.exp (with_test_prefix): Always prefix with space and + suffix with colon. Adjust leading comments. + +2012-02-21 Pedro Alves <palves@redhat.com> Tom Tromey <tromey@redhat.com> * lib/gdb.exp: Add description of test prefixes. diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp index fd069b2..718018d 100644 --- a/gdb/testsuite/gdb.arch/altivec-abi.exp +++ b/gdb/testsuite/gdb.arch/altivec-abi.exp @@ -36,7 +36,7 @@ if [get_compiler_info $binfile] { return -1 } -proc altivec_abi_tests { prefix extra_flags force_abi } { with_test_prefix $prefix { +proc altivec_abi_tests { prefix extra_flags force_abi } { global testfile binfile srcfile srcdir subdir global gdb_prompt @@ -144,10 +144,12 @@ proc altivec_abi_tests { prefix extra_flags force_abi } { with_test_prefix $pref gdb_test "p matrix\[1\]" ".*= .11, 12, 13, 14, 15, 16, 17, 18." "print second vector" gdb_test "p matrix\[2\]" ".*= .21, 22, 23, 24, 25, 26, 27, 28." "print third vector" gdb_test "p matrix\[3\]" ".*= .31, 32, 33, 34, 35, 36, 37, 38." "print fourth vector" -}} +} if [test_compiler_info gcc*] { - altivec_abi_tests " default ABI, auto:" "additional_flags=-maltivec" "auto" + with_test_prefix "default ABI, auto" { + altivec_abi_tests "additional_flags=-maltivec" "auto" + } # On GNU/Linux, we can mix -mabi=no-altivec and -mabi=altivec. # So test some combinations. @@ -156,24 +158,28 @@ if [test_compiler_info gcc*] { # was broken, so skip those tests there. if { ![is_lp64_target] || ![test_compiler_info "gcc-4-\[12\]-*"] } { set binfile ${objdir}/${subdir}/${testfile}-ge-ge - altivec_abi_tests " generic ABI, forced:" \ - "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "generic" + with_test_prefix "generic ABI, forced" { + altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "generic" + } set binfile ${objdir}/${subdir}/${testfile}-ge-auto - altivec_abi_tests " generic ABI, auto:" \ - "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "auto" + with_test_prefix "generic ABI, auto" { + altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "auto" + } } set binfile ${objdir}/${subdir}/${testfile}-av-av - altivec_abi_tests " AltiVec ABI, forced:" \ - "additional_flags=-maltivec additional_flags=-mabi=altivec" "altivec" + with_test_prefix "AltiVec ABI, forced" { + altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "altivec" + } set binfile ${objdir}/${subdir}/${testfile}-av-auto - altivec_abi_tests " AltiVec ABI, auto:" \ - "additional_flags=-maltivec additional_flags=-mabi=altivec" "auto" + with_test_prefix "AltiVec ABI, auto" { + altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "auto" + } } } elseif [test_compiler_info xlc*] { - altivec_abi_tests "" "additional_flags=-qaltivec" "auto" + altivec_abi_tests "additional_flags=-qaltivec" "auto" } else { warning "unknown compiler" return -1 diff --git a/gdb/testsuite/gdb.base/attach-pie-misread.exp b/gdb/testsuite/gdb.base/attach-pie-misread.exp index de1055e..e7ff231 100644 --- a/gdb/testsuite/gdb.base/attach-pie-misread.exp +++ b/gdb/testsuite/gdb.base/attach-pie-misread.exp @@ -152,7 +152,7 @@ gdb_expect { } # Due to alignments it was reproducible with 1 on x86_64 but 2 on i686. -foreach align_mult {1 2} { with_test_prefix " shift-by-$align_mult:" { +foreach align_mult {1 2} { with_test_prefix "shift-by-$align_mult" { # FIXME: We believe there is enough room under FIRST_OFFSET. set shifted_offset [format 0x%x [expr "$first_offset - $align_mult * $align_max"]] diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp index d6267ac..59e5753 100644 --- a/gdb/testsuite/gdb.base/break-interp.exp +++ b/gdb/testsuite/gdb.base/break-interp.exp @@ -185,12 +185,12 @@ proc reach_1 {func command displacement} { # displacement of 0 bytes to be present, "NONZERO" for displacement of non-0 # bytes to be present and "PRESENT" if both "ZERO" and "NONZERO" are valid. proc reach {func command displacement} { - with_test_prefix " reach-$func:" { + with_test_prefix "reach-$func" { reach_1 $func $command $displacement } } -proc test_core {file displacement} { with_test_prefix " core:" { +proc test_core {file displacement} { with_test_prefix "core" { global srcdir subdir gdb_prompt expect_out set corefile [core_find $file {} "segv"] @@ -239,7 +239,7 @@ proc test_core {file displacement} { with_test_prefix " core:" { gdb_test "bt" "#\[0-9\]+ +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n#\[0-9\]+ +\[^\r\n\]*\\mmain\\M.*" "core main bt" }} -proc test_attach_gdb {file pid displacement prefix} { with_test_prefix " $prefix:" { +proc test_attach_gdb {file pid displacement prefix} { with_test_prefix "$prefix" { global gdb_prompt expect_out gdb_exit diff --git a/gdb/testsuite/gdb.base/catch-load.exp b/gdb/testsuite/gdb.base/catch-load.exp index e17a563..21b8505 100644 --- a/gdb/testsuite/gdb.base/catch-load.exp +++ b/gdb/testsuite/gdb.base/catch-load.exp @@ -46,7 +46,7 @@ if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug}] ! # names. # KIND is passed to the "catch" command. # MATCH is a boolean saying whether we expect the catchpoint to be hit. -proc one_catch_load_test {scenario kind match sostop} { with_test_prefix "${scenario}:" { +proc one_catch_load_test {scenario kind match sostop} { with_test_prefix "${scenario}" { global verbose testfile testfile2 binfile2_dlopen global srcfile global decimal gdb_prompt diff --git a/gdb/testsuite/gdb.base/disp-step-syscall.exp b/gdb/testsuite/gdb.base/disp-step-syscall.exp index 61de211..c62938c 100644 --- a/gdb/testsuite/gdb.base/disp-step-syscall.exp +++ b/gdb/testsuite/gdb.base/disp-step-syscall.exp @@ -30,7 +30,7 @@ if { [istarget "i\[34567\]86-*-linux*"] || [istarget "x86_64-*-linux*"] } { return -1 } -proc disp_step_cross_syscall { syscall } { with_test_prefix " $syscall:" { +proc disp_step_cross_syscall { syscall } { with_test_prefix "$syscall" { global syscall_insn global gdb_prompt diff --git a/gdb/testsuite/gdb.base/jit-so.exp b/gdb/testsuite/gdb.base/jit-so.exp index b595774..7df2011 100644 --- a/gdb/testsuite/gdb.base/jit-so.exp +++ b/gdb/testsuite/gdb.base/jit-so.exp @@ -63,7 +63,7 @@ if { [gdb_compile_shlib ${solib_srcfile} ${solib_binfile} {}] != "" } { set solib_binfile_target [gdb_download ${solib_binfile}] -proc one_jit_test {count match_str} { with_test_prefix " one_jit_test-$count:" { +proc one_jit_test {count match_str} { with_test_prefix "one_jit_test-$count" { global verbose testfile srcfile2 binfile2 binfile2_dlopen solib_binfile_target solib_binfile_test_msg clean_restart $testfile diff --git a/gdb/testsuite/gdb.base/jit.exp b/gdb/testsuite/gdb.base/jit.exp index 4b8059f..70b33a7 100644 --- a/gdb/testsuite/gdb.base/jit.exp +++ b/gdb/testsuite/gdb.base/jit.exp @@ -51,7 +51,7 @@ if { [gdb_compile_shlib ${solib_srcfile} ${solib_binfile} {-fPIC}] != "" } { set solib_binfile_target [gdb_download ${solib_binfile}] -proc one_jit_test {count match_str} { with_test_prefix " one_jit_test-$count:" { +proc one_jit_test {count match_str} { with_test_prefix "one_jit_test-$count" { global verbose testfile solib_binfile_target solib_binfile_test_msg clean_restart $testfile diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp index cb1bd00..30ed7af 100644 --- a/gdb/testsuite/gdb.base/sepdebug.exp +++ b/gdb/testsuite/gdb.base/sepdebug.exp @@ -650,7 +650,7 @@ test_next_with_recursion #******** -proc test_different_dir {type test_different_dir xfail} { with_test_prefix " $type:" { +proc test_different_dir {type test_different_dir xfail} { with_test_prefix "$type" { global srcdir subdir objdir binfile srcfile timeout gdb_prompt global bp_location6 decimal hex diff --git a/gdb/testsuite/gdb.base/solib-display.exp b/gdb/testsuite/gdb.base/solib-display.exp index 6886e04..1491459 100644 --- a/gdb/testsuite/gdb.base/solib-display.exp +++ b/gdb/testsuite/gdb.base/solib-display.exp @@ -49,7 +49,7 @@ if [get_compiler_info ${binfile}] { } # SEP must be last for the possible `unsupported' error path. -foreach libsepdebug {NO IN SEP} { with_test_prefix " $libsepdebug:" { +foreach libsepdebug {NO IN SEP} { with_test_prefix "$libsepdebug" { set sep_lib_flags $lib_flags if {$libsepdebug != "NO"} { diff --git a/gdb/testsuite/gdb.base/solib-overlap.exp b/gdb/testsuite/gdb.base/solib-overlap.exp index 048e6cf..49e67be 100644 --- a/gdb/testsuite/gdb.base/solib-overlap.exp +++ b/gdb/testsuite/gdb.base/solib-overlap.exp @@ -52,7 +52,7 @@ set srcfile ${srcdir}/${subdir}/${testfile}.c # false PASS. # Prelink first lib1 at 0x40000000 and lib2 at 0x41000000. # During second pass try lib1 at 0x50000000 and lib2 at 0x51000000. -foreach prelink_lib1 {0x40000000 0x50000000} { with_test_prefix " $prelink_lib1:" { +foreach prelink_lib1 {0x40000000 0x50000000} { with_test_prefix "$prelink_lib1" { set prelink_lib2 [format "0x%x" [expr $prelink_lib1 + 0x01000000]] # Library file. diff --git a/gdb/testsuite/gdb.base/watch-cond-infcall.exp b/gdb/testsuite/gdb.base/watch-cond-infcall.exp index 383ce89..1c83da5 100644 --- a/gdb/testsuite/gdb.base/watch-cond-infcall.exp +++ b/gdb/testsuite/gdb.base/watch-cond-infcall.exp @@ -49,7 +49,7 @@ proc test_watchpoint { hw } { } if { ![target_info exists gdb,no_hardware_watchpoints] } { - with_test_prefix " hw:" { test_watchpoint 1 } + with_test_prefix "hw" { test_watchpoint 1 } } -with_test_prefix " sw:" { test_watchpoint 0 } +with_test_prefix "sw" { test_watchpoint 0 } diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp index 7a252bb..7200f71 100644 --- a/gdb/testsuite/gdb.base/watchpoint.exp +++ b/gdb/testsuite/gdb.base/watchpoint.exp @@ -894,7 +894,7 @@ proc do_tests {} { do_tests if ![target_info exists gdb,no_hardware_watchpoints] { - with_test_prefix " no-hw:" { + with_test_prefix "no-hw" { set no_hw 1 do_tests } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp b/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp index ecb99ef..9a6cb2a 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp @@ -33,7 +33,7 @@ if { [prepare_for_testing dw2-noloc.exp "dw2-noloc" {dw2-noloc-main.c dw2-noloc. # unresolvable: .symtab entry does not exist for this symbol name. # DW_AT_declaration is not present in any of these DIEs. -proc file_symbols {type} { with_test_prefix " $type:" { +proc file_symbols {type} { with_test_prefix "$type" { global gdb_prompt diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-watch.exp index 972fdb2..fde99dc 100644 --- a/gdb/testsuite/gdb.mi/mi-watch.exp +++ b/gdb/testsuite/gdb.mi/mi-watch.exp @@ -147,7 +147,7 @@ proc test_watchpoint_triggering {type} { clear_xfail *-*-* } -proc test_watchpoint_all {type} { with_test_prefix " $type:" { +proc test_watchpoint_all {type} { with_test_prefix "$type" { upvar srcdir srcdir upvar subdir subdir upvar binfile binfile diff --git a/gdb/testsuite/gdb.mi/mi2-watch.exp b/gdb/testsuite/gdb.mi/mi2-watch.exp index 37a919f..8aa0d94 100644 --- a/gdb/testsuite/gdb.mi/mi2-watch.exp +++ b/gdb/testsuite/gdb.mi/mi2-watch.exp @@ -146,7 +146,7 @@ proc test_watchpoint_triggering {type} { clear_xfail *-*-* } -proc test_watchpoint_all {type} { with_test_prefix " $type:" { +proc test_watchpoint_all {type} { with_test_prefix "$type" { upvar srcdir srcdir upvar subdir subdir upvar binfile binfile diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp index c6ced8e..8dc9bf4 100644 --- a/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp +++ b/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp @@ -30,7 +30,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab return -1 } -proc do_test { lock_sched } { with_test_prefix " lock-sched$lock_sched:" { +proc do_test { lock_sched } { with_test_prefix "lock-sched$lock_sched" { global executable clean_restart ${executable} diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp index 66f090a..2d49773 100644 --- a/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp +++ b/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp @@ -31,7 +31,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab return -1 } -proc do_test { lock_sched } { with_test_prefix " lock-sched$lock_sched:" { +proc do_test { lock_sched } { with_test_prefix "lock-sched$lock_sched" { global executable clean_restart ${executable} diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp index 83d243f..7d6841d 100644 --- a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp +++ b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp @@ -33,7 +33,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab return -1 } -proc do_test { lock_sched } { with_test_prefix " lock-sched$lock_sched:" { +proc do_test { lock_sched } { with_test_prefix "lock-sched$lock_sched" { global executable clean_restart ${executable} diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp index 7fce0ef..aecf107 100644 --- a/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp +++ b/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp @@ -32,7 +32,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab return -1 } -proc do_test { lock_sched } { with_test_prefix " lock-sched$lock_sched:" { +proc do_test { lock_sched } { with_test_prefix "lock-sched$lock_sched" { global executable clean_restart ${executable} diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork.exp b/gdb/testsuite/gdb.threads/watchpoint-fork.exp index db05e1f..086c9bd 100644 --- a/gdb/testsuite/gdb.threads/watchpoint-fork.exp +++ b/gdb/testsuite/gdb.threads/watchpoint-fork.exp @@ -22,7 +22,7 @@ if [is_remote target] { return } -proc test {type symbol} { with_test_prefix " $type:" { +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 diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp index ab4cd5f..5197983 100644 --- a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp +++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp @@ -38,7 +38,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable return -1 } -foreach reorder {0 1} { with_test_prefix " reorder$reorder:" { +foreach reorder {0 1} { with_test_prefix "reorder$reorder" { clean_restart $testfile diff --git a/gdb/testsuite/gdb.trace/change-loc.exp b/gdb/testsuite/gdb.trace/change-loc.exp index 91cdb11..d6062fc 100644 --- a/gdb/testsuite/gdb.trace/change-loc.exp +++ b/gdb/testsuite/gdb.trace/change-loc.exp @@ -71,7 +71,7 @@ if [is_amd64_regs_target] { # Set tracepoint during tracing experiment. -proc tracepoint_change_loc_1 { trace_type } { with_test_prefix " 1 $trace_type:" { +proc tracepoint_change_loc_1 { trace_type } { with_test_prefix "1 $trace_type" { global testfile global srcfile global pcreg @@ -141,7 +141,7 @@ proc tracepoint_change_loc_1 { trace_type } { with_test_prefix " 1 $trace_type:" # Set pending tracepoint. -proc tracepoint_change_loc_2 { trace_type } { with_test_prefix " 2 $trace_type:" { +proc tracepoint_change_loc_2 { trace_type } { with_test_prefix "2 $trace_type" { global srcdir global srcfile global subdir diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp index 7a9d01d..017aea9 100644 --- a/gdb/testsuite/gdb.trace/pending.exp +++ b/gdb/testsuite/gdb.trace/pending.exp @@ -60,7 +60,7 @@ if ![gdb_target_supports_trace] { # Verify pending tracepoint is resolved to running to main. -proc pending_tracepoint_resolved { trace_type } { with_test_prefix " $trace_type resolved:" { +proc pending_tracepoint_resolved { trace_type } { with_test_prefix "$trace_type resolved" { global srcdir global subdir global binfile @@ -101,7 +101,7 @@ proc pending_tracepoint_resolved { trace_type } { with_test_prefix " $trace_type # Verify pending tracepoint is resolved and works as expected. -proc pending_tracepoint_works { trace_type } { with_test_prefix " $trace_type works:" { +proc pending_tracepoint_works { trace_type } { with_test_prefix "$trace_type works" { global executable global srcfile global lib_sl1 @@ -155,7 +155,7 @@ proc pending_tracepoint_works { trace_type } { with_test_prefix " $trace_type wo # Verify pending tracepoint is resolved during trace. proc pending_tracepoint_resolved_during_trace { trace_type } \ -{ with_test_prefix " $trace_type resolved_in_trace:" \ +{ with_test_prefix "$trace_type resolved_in_trace" \ { global executable global srcfile @@ -214,7 +214,7 @@ proc pending_tracepoint_resolved_during_trace { trace_type } \ # Verify pending tracepoint is resolved and installed during trace. proc pending_tracepoint_installed_during_trace { trace_type } \ -{ with_test_prefix " $trace_type installed_in_trace:" \ +{ with_test_prefix "$trace_type installed_in_trace" \ { global executable global srcfile @@ -279,7 +279,7 @@ proc pending_tracepoint_installed_during_trace { trace_type } \ # Verify pending tracepoint will no longer work if we disconnect during tracing. proc pending_tracepoint_disconnect_during_trace { trace_type } \ -{ with_test_prefix " $trace_type disconn:" \ +{ with_test_prefix "$trace_type disconn" \ { global executable global srcfile @@ -327,7 +327,7 @@ proc pending_tracepoint_disconnect_during_trace { trace_type } \ # Verify disconnect after pending tracepoint has been resolved. proc pending_tracepoint_disconnect_after_resolved { trace_type } \ -{ with_test_prefix " $trace_type disconn_resolved:" \ +{ with_test_prefix "$trace_type disconn_resolved" \ { global executable global srcfile @@ -379,7 +379,7 @@ proc pending_tracepoint_disconnect_after_resolved { trace_type } \ # Verify action works properly in resolved tracepoint. proc pending_tracepoint_with_action_resolved { trace_type } \ -{ with_test_prefix " $trace_type action_resolved:" \ +{ with_test_prefix "$trace_type action_resolved" \ { global executable global srcfile diff --git a/gdb/testsuite/gdb.trace/status-stop.exp b/gdb/testsuite/gdb.trace/status-stop.exp index 859e9cc..9c2320e 100644 --- a/gdb/testsuite/gdb.trace/status-stop.exp +++ b/gdb/testsuite/gdb.trace/status-stop.exp @@ -39,7 +39,7 @@ if ![gdb_target_supports_trace] { # Verify that the sequence of commands "tstart tstop tstart" works well. -proc test_tstart_tstop_tstart { } { with_test_prefix " tstart_tstop_tstart:" { +proc test_tstart_tstop_tstart { } { with_test_prefix "tstart_tstop_tstart" { global executable global hex @@ -63,7 +63,7 @@ proc test_tstart_tstop_tstart { } { with_test_prefix " tstart_tstop_tstart:" { # Verify the sequence of commands "tstart tstart" works well. -proc test_tstart_tstart { } { with_test_prefix " tstart_tstart:" { +proc test_tstart_tstart { } { with_test_prefix "tstart_tstart" { global executable global hex @@ -82,7 +82,7 @@ proc test_tstart_tstart { } { with_test_prefix " tstart_tstart:" { # Verify that trace stops clearly when trace buffer is full. -proc test_buffer_full_tstart { } { with_test_prefix " buffer_full_tstart:" { +proc test_buffer_full_tstart { } { with_test_prefix "buffer_full_tstart" { global executable global hex diff --git a/gdb/testsuite/gdb.trace/strace.exp b/gdb/testsuite/gdb.trace/strace.exp index 54f96a3..7f4551e 100644 --- a/gdb/testsuite/gdb.trace/strace.exp +++ b/gdb/testsuite/gdb.trace/strace.exp @@ -52,7 +52,7 @@ if { ![gdb_target_supports_trace] } then { gdb_load_shlibs $libipa -proc strace_info_marker { } { with_test_prefix " info_marker" { +proc strace_info_marker { } { with_test_prefix "info_marker" { global executable global gdb_prompt @@ -76,7 +76,7 @@ proc strace_info_marker { } { with_test_prefix " info_marker" { } }} -proc strace_probe_marker { } { with_test_prefix " probe_marker" { +proc strace_probe_marker { } { with_test_prefix "probe_marker" { global executable global expect_out global gdb_prompt @@ -105,7 +105,7 @@ proc strace_probe_marker { } { with_test_prefix " probe_marker" { gdb_test "tfind" "Target failed to find requested trace frame\\..*" }} -proc strace_trace_on_same_addr { type } { with_test_prefix " trace_same_addr $type" { +proc strace_trace_on_same_addr { type } { with_test_prefix "trace_same_addr $type" { global executable global expect_out global gdb_prompt @@ -195,7 +195,7 @@ proc strace_trace_on_same_addr { type } { with_test_prefix " trace_same_addr $ty } }} -proc strace_trace_on_diff_addr { } { with_test_prefix " trace_diff_addr" { +proc strace_trace_on_diff_addr { } { with_test_prefix "trace_diff_addr" { global executable global expect_out diff --git a/gdb/testsuite/gdb.trace/trace-break.exp b/gdb/testsuite/gdb.trace/trace-break.exp index 5fcc1ac..6c5e43a 100644 --- a/gdb/testsuite/gdb.trace/trace-break.exp +++ b/gdb/testsuite/gdb.trace/trace-break.exp @@ -56,7 +56,7 @@ if [is_amd64_regs_target] { # Set breakpoint and tracepoint at the same address. proc break_trace_same_addr_1 { trace_type option } \ -{ with_test_prefix " 1 $trace_type $option:" \ +{ with_test_prefix "1 $trace_type $option" \ { global executable global hex @@ -89,7 +89,7 @@ proc break_trace_same_addr_1 { trace_type option } \ # Set multiple tracepoints at the same address. proc break_trace_same_addr_2 { trace_type1 trace_type2 option } \ -{ with_test_prefix " 2 $trace_type1 $trace_type2 $option:" \ +{ with_test_prefix "2 $trace_type1 $trace_type2 $option" \ { global executable global hex @@ -127,7 +127,7 @@ proc break_trace_same_addr_2 { trace_type1 trace_type2 option } \ # that tracepoint still works. proc break_trace_same_addr_3 { trace_type option } \ -{ with_test_prefix " 3 $trace_type $option:" \ +{ with_test_prefix "3 $trace_type $option" \ { global executable global hex @@ -162,7 +162,7 @@ proc break_trace_same_addr_3 { trace_type option } \ # that breakpoint still works. proc break_trace_same_addr_4 { trace_type option } \ -{ with_test_prefix " 4 $trace_type $option:" \ +{ with_test_prefix "4 $trace_type $option" \ { global executable global hex @@ -201,7 +201,7 @@ proc break_trace_same_addr_4 { trace_type option } \ # of two locations. Verify these tracepoints work as expected. proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } \ -{ with_test_prefix " 5 $trace1 $trace2 ${trace3}@${trace3_at_first_loc}:" \ +{ with_test_prefix "5 $trace1 $trace2 ${trace3}@${trace3_at_first_loc}" \ { global executable global hex @@ -273,7 +273,7 @@ proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } \ # tracepoints work as expect. proc break_trace_same_addr_6 { trace1 enable1 trace2 enable2 } \ -{ with_test_prefix " 6 $trace1 $enable1 $trace2 $enable2:" \ +{ with_test_prefix "6 $trace1 $enable1 $trace2 $enable2" \ { global executable global hex diff --git a/gdb/testsuite/gdb.trace/unavailable.exp b/gdb/testsuite/gdb.trace/unavailable.exp index 199e219..9130b4b 100644 --- a/gdb/testsuite/gdb.trace/unavailable.exp +++ b/gdb/testsuite/gdb.trace/unavailable.exp @@ -136,7 +136,7 @@ proc test_maybe_regvar_display { var } { # Test procs # -proc gdb_collect_args_test {} { with_test_prefix " unavailable arguments:" { +proc gdb_collect_args_test {} { with_test_prefix "unavailable arguments" { global cr global gdb_prompt @@ -203,7 +203,7 @@ proc gdb_collect_args_test {} { with_test_prefix " unavailable arguments:" { "cease trace debugging" }} -proc gdb_collect_locals_test { func msg } { with_test_prefix " unavailable locals: $msg:" { +proc gdb_collect_locals_test { func msg } { with_test_prefix "unavailable locals: $msg" { global cr global gdb_prompt @@ -254,7 +254,7 @@ proc gdb_collect_locals_test { func msg } { with_test_prefix " unavailable local "cease trace debugging" }} -proc gdb_unavailable_registers_test { } { with_test_prefix " unavailable registers:" { +proc gdb_unavailable_registers_test { } { with_test_prefix "unavailable registers" { global gdb_prompt global spreg global pcreg @@ -305,7 +305,7 @@ proc gdb_unavailable_registers_test { } { with_test_prefix " unavailable registe gdb_test "tfind none" "#0 end .*" "cease trace debugging" }} -proc gdb_collect_globals_test { } { with_test_prefix " collect globals:" { +proc gdb_collect_globals_test { } { with_test_prefix "collect globals" { global ws global cr global gdb_prompt diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 3a43f95..7a6d7e7 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1507,21 +1507,21 @@ proc skip_shlib_tests {} { # gdb_test ... ... "test foo" # gdb_test ... ... "test bar" # -# with_test_prefix " subvariation a:" { +# with_test_prefix "subvariation a" { # gdb_test ... ... "test x" # } # -# with_test_prefix " subvariation b:" { +# with_test_prefix "subvariation b" { # gdb_test ... ... "test x" # } # } # -# with_test_prefix " variation1:" { +# with_test_prefix "variation1" { # ...do setup for variation 1... # do_tests # } # -# with_test_prefix " variation2:" { +# with_test_prefix "variation2" { # ...do setup for variation 2... # do_tests # } @@ -1543,19 +1543,20 @@ proc skip_shlib_tests {} { # # global pf_prefix # set saved_pf_prefix -# append pf_prefix "${foo} bar" +# append pf_prefix "${foo}: bar" # ... actual tests ... # set pf_prefix $saved_pf_prefix # # Run BODY in the context of the caller, with the current test prefix -# (pf_prefix) appended with PREFIX. Returns the result of BODY. +# (pf_prefix) appended with one space, then PREFIX, and then a colon. +# Returns the result of BODY. # proc with_test_prefix { prefix body } { global pf_prefix set saved $pf_prefix - append pf_prefix $prefix + append pf_prefix " " $prefix ":" set code [catch {uplevel 1 $body} result] set pf_prefix $saved |