* gdb.trace/actions.exp: Use standard_testfile.

* gdb.trace/ax.exp: Use standard_testfile.
	* gdb.trace/backtrace.exp: Use standard_testfile.
	* gdb.trace/change-loc.exp: Use standard_testfile.
	* gdb.trace/circ.exp: Use standard_testfile, prepare_for_testing.
	* gdb.trace/collection.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.trace/deltrace.exp: Use standard_testfile.
	* gdb.trace/disconnected-tracing.exp: Use standard_testfile.
	* gdb.trace/ftrace.exp: Use standard_testfile.
	* gdb.trace/infotrace.exp: Use standard_testfile.
	* gdb.trace/packetlen.exp: Use standard_testfile.
	* gdb.trace/passc-dyn.exp: Use standard_testfile.
	* gdb.trace/passcount.exp: Use standard_testfile.
	* gdb.trace/pending.exp: Use standard_testfile.
	* gdb.trace/report.exp: Use standard_testfile.
	* gdb.trace/save-trace.exp: Use standard_testfile.
	* gdb.trace/stap-trace.exp: Use standard_testfile.
	* gdb.trace/status-stop.exp: Use standard_testfile.
	* gdb.trace/strace.exp: Use standard_testfile.
	* gdb.trace/tfile.exp: Use standard_testfile.
	* gdb.trace/tfind.exp: Use standard_testfile.
	* gdb.trace/trace-break.exp: Use standard_testfile.
	* gdb.trace/trace-mt.exp: Use standard_testfile.
	* gdb.trace/tracecmd.exp: Use standard_testfile.
	* gdb.trace/tspeed.exp: Use standard_testfile.
	* gdb.trace/tstatus.exp: Use standard_testfile.
	* gdb.trace/tsv.exp: Use standard_testfile.
	* gdb.trace/unavailable.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.trace/while-dyn.exp: Use standard_testfile.
	* gdb.trace/while-stepping.exp: Use standard_testfile.
This commit is contained in:
Tom Tromey
2012-06-26 18:25:19 +00:00
parent 7686c07459
commit 497a5eb039
31 changed files with 83 additions and 122 deletions

View File

@ -1,3 +1,38 @@
2012-06-26 Tom Tromey <tromey@redhat.com>
* gdb.trace/actions.exp: Use standard_testfile.
* gdb.trace/ax.exp: Use standard_testfile.
* gdb.trace/backtrace.exp: Use standard_testfile.
* gdb.trace/change-loc.exp: Use standard_testfile.
* gdb.trace/circ.exp: Use standard_testfile, prepare_for_testing.
* gdb.trace/collection.exp: Use standard_testfile,
prepare_for_testing.
* gdb.trace/deltrace.exp: Use standard_testfile.
* gdb.trace/disconnected-tracing.exp: Use standard_testfile.
* gdb.trace/ftrace.exp: Use standard_testfile.
* gdb.trace/infotrace.exp: Use standard_testfile.
* gdb.trace/packetlen.exp: Use standard_testfile.
* gdb.trace/passc-dyn.exp: Use standard_testfile.
* gdb.trace/passcount.exp: Use standard_testfile.
* gdb.trace/pending.exp: Use standard_testfile.
* gdb.trace/report.exp: Use standard_testfile.
* gdb.trace/save-trace.exp: Use standard_testfile.
* gdb.trace/stap-trace.exp: Use standard_testfile.
* gdb.trace/status-stop.exp: Use standard_testfile.
* gdb.trace/strace.exp: Use standard_testfile.
* gdb.trace/tfile.exp: Use standard_testfile.
* gdb.trace/tfind.exp: Use standard_testfile.
* gdb.trace/trace-break.exp: Use standard_testfile.
* gdb.trace/trace-mt.exp: Use standard_testfile.
* gdb.trace/tracecmd.exp: Use standard_testfile.
* gdb.trace/tspeed.exp: Use standard_testfile.
* gdb.trace/tstatus.exp: Use standard_testfile.
* gdb.trace/tsv.exp: Use standard_testfile.
* gdb.trace/unavailable.exp: Use standard_testfile,
prepare_for_testing.
* gdb.trace/while-dyn.exp: Use standard_testfile.
* gdb.trace/while-stepping.exp: Use standard_testfile.
2012-06-26 Tom Tromey <tromey@redhat.com> 2012-06-26 Tom Tromey <tromey@redhat.com>
* gdb.reverse/break-precsave.exp: Use standard_testfile. * gdb.reverse/break-precsave.exp: Use standard_testfile.

View File

@ -21,9 +21,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile
set srcfile ${testfile}.c
set binfile $objdir/$subdir/actions
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested actions.exp untested actions.exp

View File

@ -23,9 +23,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile $objdir/$subdir/ax
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested ax.exp untested ax.exp

View File

@ -21,9 +21,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile $objdir/$subdir/backtrace
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested backtrace.exp untested backtrace.exp

View File

@ -18,16 +18,14 @@ if {[skip_shlib_tests]} {
return 0 return 0
} }
set testfile "change-loc" standard_testfile
set libfile1 "change-loc-1" set libfile1 "change-loc-1"
set libfile2 "change-loc-2" set libfile2 "change-loc-2"
set srcfile $testfile.c
set executable $testfile set executable $testfile
set libsrc1 $srcdir/$subdir/$libfile1.c set libsrc1 $srcdir/$subdir/$libfile1.c
set libsrc2 $srcdir/$subdir/$libfile2.c set libsrc2 $srcdir/$subdir/$libfile2.c
set binfile $objdir/$subdir/$testfile set lib_sl1 [standard_output_file $libfile1.sl]
set lib_sl1 $objdir/$subdir/$libfile1.sl set lib_sl2 [standard_output_file $libfile2.sl]
set lib_sl2 $objdir/$subdir/$libfile2.sl
set lib_opts debug set lib_opts debug

View File

@ -16,13 +16,9 @@
load_lib "trace-support.exp" load_lib "trace-support.exp"
set testfile "circ" standard_testfile
set srcfile ${testfile}.c
set binfile $objdir/$subdir/$testfile
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug nowarnings}]} {
executable {debug nowarnings}] != "" } {
untested circ.exp
return -1 return -1
} }
@ -200,13 +196,6 @@ proc gdb_trace_circular_tests { } {
return 0; return 0;
} }
# Start with a fresh gdb.
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load $binfile
gdb_test_no_output "set circular-trace-buffer on" \ gdb_test_no_output "set circular-trace-buffer on" \
"set circular-trace-buffer on" "set circular-trace-buffer on"

View File

@ -16,14 +16,10 @@
load_lib "trace-support.exp" load_lib "trace-support.exp"
set testfile "collection" standard_testfile
set srcfile ${testfile}.c
set executable $testfile set executable $testfile
set binfile $objdir/$subdir/$executable
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug nowarnings}]} {
executable {debug nowarnings}] != "" } {
untested collection.exp
return -1 return -1
} }
@ -776,7 +772,6 @@ proc gdb_trace_collection_test {} {
} }
clean_restart $executable
runto_main runto_main
if { ![gdb_target_supports_trace] } then { if { ![gdb_target_supports_trace] } then {

View File

@ -21,9 +21,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile $objdir/$subdir/deltrace
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested deltrace.exp untested deltrace.exp

View File

@ -17,10 +17,8 @@
load_lib "trace-support.exp"; load_lib "trace-support.exp";
set testfile "disconnected-tracing" standard_testfile
set executable $testfile set executabel $testfile
set srcfile ${testfile}.c
set binfile $objdir/$subdir/$testfile
set expfile $testfile.exp set expfile $testfile.exp
set gdbserver_reconnect_p 1 set gdbserver_reconnect_p 1

View File

@ -14,10 +14,8 @@
load_lib "trace-support.exp"; load_lib "trace-support.exp";
set testfile "ftrace" standard_testfile
set executable $testfile set executable $testfile
set srcfile $testfile.c
set binfile $objdir/$subdir/$testfile
set expfile $testfile.exp set expfile $testfile.exp
# Some targets have leading underscores on assembly symbols. # Some targets have leading underscores on assembly symbols.

View File

@ -21,9 +21,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile $objdir/$subdir/infotrace
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested infotrace.exp untested infotrace.exp

View File

@ -21,9 +21,7 @@ load_lib "trace-support.exp"
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile $objdir/$subdir/packetlen
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested packetlen.exp untested packetlen.exp

View File

@ -20,9 +20,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile $objdir/$subdir/passc-dyn
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested passc-dyn.exp untested passc-dyn.exp

View File

@ -20,9 +20,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile $objdir/$subdir/passcount
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested passcount.exp untested passcount.exp

View File

@ -18,16 +18,14 @@ if {[skip_shlib_tests]} {
return 0 return 0
} }
set testfile "pending" standard_testfile
set libfile1 "pendshr1" set libfile1 "pendshr1"
set libfile2 "pendshr2" set libfile2 "pendshr2"
set executable $testfile set executable $testfile
set srcfile $testfile.c
set libsrc1 $srcdir/$subdir/$libfile1.c set libsrc1 $srcdir/$subdir/$libfile1.c
set libsrc2 $srcdir/$subdir/$libfile2.c set libsrc2 $srcdir/$subdir/$libfile2.c
set binfile $objdir/$subdir/$testfile set lib_sl1 [standard_output_file $libfile1.sl]
set lib_sl1 $objdir/$subdir/$libfile1.sl set lib_sl2 [standard_output_file $libfile2.sl]
set lib_sl2 $objdir/$subdir/$libfile2.sl
set lib_opts [gdb_target_symbol_prefix_flags] set lib_opts [gdb_target_symbol_prefix_flags]

View File

@ -21,9 +21,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile $objdir/$subdir/report
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested report.exp untested report.exp

View File

@ -21,9 +21,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile $objdir/$subdir/save-trace
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested save-trace.exp untested save-trace.exp
@ -136,20 +134,21 @@ remote_file host delete savetrace.tr
# 10.3 repeat with a path to the file # 10.3 repeat with a path to the file
set escapedfilename [string_to_regexp $objdir/savetrace.tr] set trace_file_name [standard_output_file savetrace.tr]
remote_file host delete $objdir/savetrace.tr set escapedfilename [string_to_regexp $trace_file_name]
gdb_test "save-tracepoints $objdir/savetrace.tr" \ remote_file host delete $trace_file_name
gdb_test "save-tracepoints $trace_file_name" \
"Saved to file '${escapedfilename}'." \ "Saved to file '${escapedfilename}'." \
"10.3: save tracepoint definitions, full path" "10.3: save tracepoint definitions, full path"
gdb_delete_tracepoints gdb_delete_tracepoints
gdb_test_no_output "set default-collect" "10.3: clear default-collect" gdb_test_no_output "set default-collect" "10.3: clear default-collect"
gdb_test "info tracepoints" "No tracepoints." "10.3: delete tracepoints" gdb_test "info tracepoints" "No tracepoints." "10.3: delete tracepoints"
gdb_test "source $objdir/savetrace.tr" \ gdb_test "source $trace_file_name" \
"Tracepoint \[0-9\]+ at .*" \ "Tracepoint \[0-9\]+ at .*" \
"10.4: read saved tracepoints, full path" "10.4: read saved tracepoints, full path"
gdb_verify_tracepoints "10.3: verify recovered tracepoints, full path"; gdb_verify_tracepoints "10.3: verify recovered tracepoints, full path";
remote_file host delete $objdir/savetrace.tr remote_file host delete $trace_file_name
# 10.5 invalid filename # 10.5 invalid filename
# [deferred -- not sure what a good invalid filename would be] # [deferred -- not sure what a good invalid filename would be]

View File

@ -15,10 +15,8 @@
load_lib "trace-support.exp" load_lib "trace-support.exp"
set testfile "stap-trace" standard_testfile
set srcfile ${testfile}.c
set executable "" set executable ""
set binfile_dir $objdir/$subdir
set ws "\[\r\n\t \]+" set ws "\[\r\n\t \]+"
set cr "\[\r\n\]+" set cr "\[\r\n\]+"
@ -31,7 +29,6 @@ if { ![istarget "x86_64-*"] && ![istarget "i?86-*"] } {
proc compile_stap_bin {exec_name {arg ""}} { proc compile_stap_bin {exec_name {arg ""}} {
global srcfile global srcfile
global binfile_dir
global srcdir global srcdir
global subdir global subdir
global executable global executable
@ -43,8 +40,8 @@ proc compile_stap_bin {exec_name {arg ""}} {
set executable ${exec_name} set executable ${exec_name}
if { [gdb_compile "$srcdir/$subdir/$srcfile" \ if { [gdb_compile "$srcdir/$subdir/$srcfile" \
"$binfile_dir/$exec_name" \ [standard_output_file $exec_name] \
executable [concat $arg debug nowarnings]] != "" } { executable [concat $arg debug nowarnings]] != "" } {
untested "Could not compile ${srcfile}" untested "Could not compile ${srcfile}"
return 0 return 0
} }

View File

@ -14,10 +14,8 @@
load_lib "trace-support.exp"; load_lib "trace-support.exp";
set testfile "status-stop" standard_testfile
set executable $testfile set executable $testfile
set srcfile ${testfile}.c
set binfile $objdir/$subdir/$testfile
set expfile $testfile.exp set expfile $testfile.exp

View File

@ -18,9 +18,7 @@ if {[skip_shlib_tests]} {
return 0 return 0
} }
set testfile "strace" standard_testfile
set srcfile $testfile.c
set binfile $objdir/$subdir/$testfile
set executable $testfile set executable $testfile
set libipa [get_in_proc_agent] set libipa [get_in_proc_agent]

View File

@ -30,9 +30,7 @@ if [target_info exists gdb,nofileio] {
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "tfile" standard_testfile
set srcfile ${testfile}.c
set binfile $objdir/$subdir/$testfile
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested ${testfile}.exp untested ${testfile}.exp

View File

@ -21,9 +21,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile $objdir/$subdir/tfind
if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \ if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {

View File

@ -14,10 +14,8 @@
load_lib "trace-support.exp"; load_lib "trace-support.exp";
set testfile "trace-break" standard_testfile
set executable $testfile set executable $testfile
set srcfile $testfile.c
set binfile $objdir/$subdir/$testfile
set expfile $testfile.exp set expfile $testfile.exp
# Some targets have leading underscores on assembly symbols. # Some targets have leading underscores on assembly symbols.

View File

@ -14,10 +14,8 @@
load_lib "trace-support.exp"; load_lib "trace-support.exp";
set testfile "trace-mt" standard_testfile
set executable $testfile set executable $testfile
set srcfile $testfile.c
set binfile $objdir/$subdir/$testfile
set expfile $testfile.exp set expfile $testfile.exp
# Some targets have leading underscores on assembly symbols. # Some targets have leading underscores on assembly symbols.

View File

@ -20,9 +20,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile $objdir/$subdir/tracecmd
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested tracecmd.exp untested tracecmd.exp

View File

@ -15,10 +15,8 @@
load_lib "trace-support.exp" load_lib "trace-support.exp"
set testfile "tspeed" standard_testfile
set srcfile ${testfile}.c
set executable $testfile set executable $testfile
set binfile $objdir/$subdir/$executable
set ipalib [get_in_proc_agent] set ipalib [get_in_proc_agent]

View File

@ -14,10 +14,8 @@
load_lib "trace-support.exp" load_lib "trace-support.exp"
set testfile "actions" standard_testfile actions.c
set executable $testfile set executable $testfile
set srcfile $testfile.c
set binfile $objdir/$subdir/$testfile
set expfile tstatus.exp set expfile tstatus.exp
if [prepare_for_testing $expfile $executable $srcfile \ if [prepare_for_testing $expfile $executable $srcfile \

View File

@ -18,9 +18,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile $objdir/$subdir/tsv
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested tsv.exp untested tsv.exp

View File

@ -15,14 +15,11 @@
load_lib "trace-support.exp" load_lib "trace-support.exp"
set testfile "unavailable" standard_testfile unavailable.cc
set srcfile ${testfile}.cc
set executable $testfile set executable $testfile
set binfile $objdir/$subdir/$executable
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if {[prepare_for_testing $testfile.exp $testfile $srcfile \
executable {debug nowarnings c++}] != "" } { {debug nowarnings c++}]} {
untested unavailable.exp
return -1 return -1
} }
@ -588,7 +585,6 @@ proc gdb_trace_collection_test {} {
gdb_collect_locals_test statlocal_test_func "static locals" gdb_collect_locals_test statlocal_test_func "static locals"
} }
clean_restart $executable
runto_main runto_main
if { ![gdb_target_supports_trace] } then { if { ![gdb_target_supports_trace] } then {

View File

@ -21,10 +21,8 @@ load_lib "trace-support.exp"
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile $testfile.c set executable $testfile
set executable while-dyn
set binfile $objdir/$subdir/$executable
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested while-dyn.exp untested while-dyn.exp

View File

@ -21,9 +21,7 @@ load_lib "trace-support.exp";
gdb_exit gdb_exit
gdb_start gdb_start
set testfile "actions" standard_testfile actions.c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/while-stepping
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
executable {debug nowarnings}] != "" } { executable {debug nowarnings}] != "" } {
untested while-stepping.exp untested while-stepping.exp