test suite update - gdb.base/[t-z]
Convert files gdb.base/[t-z]*.exp to use standard_output_file et al. * gdb.base/testenv.exp, gdb.base/tui-layout.exp, gdb.base/twice.exp, gdb.base/type-opaque.exp, gdb.base/unload.exp, gdb.base/unwindonsignal.exp, gdb.base/valgrind-db-attach.exp, gdb.base/valgrind-infcall.exp, gdb.base/value-double-free.exp, gdb.base/varargs.exp, gdb.base/watch-cond-infcall.exp, gdb.base/watch-cond.exp, gdb.base/watch-non-mem.exp, gdb.base/watch-read.exp, gdb.base/watch-vfork.exp, gdb.base/watch_thread_num.exp, gdb.base/watchpoint-cond-gone.exp, gdb.base/watchpoint-delete.exp, gdb.base/watchpoint-hw.exp, gdb.base/watchpoint-solib.exp, gdb.base/watchpoint.exp, gdb.base/watchpoints.exp, gdb.base/wchar.exp, gdb.base/whatis.exp: Use standard_testfile, standard_output_file, prepare_for_testing, clean_restart.
This commit is contained in:
parent
0ab77f5fa2
commit
62cef5152a
|
@ -1,3 +1,19 @@
|
|||
2013-06-27 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gdb.base/testenv.exp, gdb.base/tui-layout.exp,
|
||||
gdb.base/twice.exp, gdb.base/type-opaque.exp, gdb.base/unload.exp,
|
||||
gdb.base/unwindonsignal.exp, gdb.base/valgrind-db-attach.exp,
|
||||
gdb.base/valgrind-infcall.exp, gdb.base/value-double-free.exp,
|
||||
gdb.base/varargs.exp, gdb.base/watch-cond-infcall.exp,
|
||||
gdb.base/watch-cond.exp, gdb.base/watch-non-mem.exp,
|
||||
gdb.base/watch-read.exp, gdb.base/watch-vfork.exp,
|
||||
gdb.base/watch_thread_num.exp, gdb.base/watchpoint-cond-gone.exp,
|
||||
gdb.base/watchpoint-delete.exp, gdb.base/watchpoint-hw.exp,
|
||||
gdb.base/watchpoint-solib.exp, gdb.base/watchpoint.exp,
|
||||
gdb.base/watchpoints.exp, gdb.base/wchar.exp, gdb.base/whatis.exp:
|
||||
Use standard_testfile, standard_output_file, prepare_for_testing,
|
||||
clean_restart.
|
||||
|
||||
2013-06-27 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gdb.base/save-bp.exp, gdb.base/savedregs.exp,
|
||||
|
|
|
@ -23,9 +23,7 @@ if { [is_remote target] } {
|
|||
return 0
|
||||
}
|
||||
|
||||
set testfile "testenv"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${testfile}
|
||||
standard_testfile .c
|
||||
|
||||
# Compile binary
|
||||
# and start with a fresh gdb
|
||||
|
|
|
@ -13,8 +13,9 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set testfile tui-layout
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} start.c] } {
|
||||
standard_testfile start.c
|
||||
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -14,29 +14,25 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
set testfile twice-tmp
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_output_file twice.c
|
||||
set options debug
|
||||
lappend options "additional_flags=-I."
|
||||
|
||||
set fileid [open ${objdir}/${subdir}/${srcfile} w]
|
||||
set local_srcfile [standard_output_file twice-tmp.c]
|
||||
set fileid [open $local_srcfile w]
|
||||
puts $fileid "#include \"twice.c\""
|
||||
close $fileid
|
||||
|
||||
remote_download host ${srcdir}/${subdir}/twice.c twice.c
|
||||
|
||||
if { [gdb_compile "${objdir}/${subdir}/${srcfile}" "${binfile}" executable $options] != "" } {
|
||||
if { [gdb_compile $local_srcfile "${binfile}" executable $options] != "" } {
|
||||
untested twice.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load $binfile
|
||||
clean_restart $binfile
|
||||
|
||||
if [runto_main] then {
|
||||
# Test that GDB can still detect whether we have line numbers
|
||||
|
|
|
@ -19,13 +19,11 @@ if {[skip_shlib_tests]} {
|
|||
return -1
|
||||
}
|
||||
|
||||
set testfile type-opaque-main
|
||||
set libfile type-opaque-lib
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile type-opaque-main.c
|
||||
|
||||
set libfile type-opaque-lib
|
||||
set libsrc "${srcdir}/${subdir}/${libfile}.c"
|
||||
set libobj "${objdir}/${subdir}/${libfile}.so"
|
||||
set libobj [standard_output_file ${libfile}.so]
|
||||
set execsrc "${srcdir}/${subdir}/${srcfile}"
|
||||
|
||||
remote_exec build "rm -f ${binfile}"
|
||||
|
@ -41,10 +39,7 @@ if { [gdb_compile_shlib $libsrc $libobj {debug}] != ""
|
|||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
gdb_load_shlibs ${libobj}
|
||||
|
||||
if ![runto_main] then {
|
||||
|
|
|
@ -31,12 +31,12 @@ set libname2 "${libfile2}.sl"
|
|||
set libsrcfile ${libfile}.c
|
||||
set libsrcfile2 ${libfile2}.c
|
||||
set srcfile $srcdir/$subdir/$testfile.c
|
||||
set binfile $objdir/$subdir/$testfile
|
||||
set shlibdir ${objdir}/${subdir}
|
||||
set binfile [standard_output_file $testfile]
|
||||
set shlibdir [standard_output_file {}]
|
||||
set libsrc $srcdir/$subdir/$libfile.c
|
||||
set libsrc2 $srcdir/$subdir/$libfile2.c
|
||||
set lib_sl $objdir/$subdir/$libname
|
||||
set lib_sl2 $objdir/$subdir/$libname2
|
||||
set lib_sl [standard_output_file $libname]
|
||||
set lib_sl2 [standard_output_file $libname2]
|
||||
set lib_dlopen [shlib_target_file ${libname}]
|
||||
set lib_dlopen2 [shlib_target_file ${libname2}]
|
||||
set lib_syms [shlib_symbol_file ${libname}]
|
||||
|
|
|
@ -24,15 +24,6 @@ if [target_info exists gdb,nosignals] {
|
|||
}
|
||||
|
||||
|
||||
set testfile "unwindonsignal"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested unwindonsignal.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
# Some targets can't do function calls, so don't even bother with this
|
||||
# test.
|
||||
if [target_info exists gdb,cannot_call_functions] {
|
||||
|
@ -41,12 +32,12 @@ if [target_info exists gdb,cannot_call_functions] {
|
|||
continue
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
standard_testfile
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
|
||||
untested $testfile.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
if { ![runto_main] } {
|
||||
fail "Can't run to main"
|
||||
|
|
|
@ -18,11 +18,8 @@ if [is_remote target] {
|
|||
return 0
|
||||
}
|
||||
|
||||
set test valgrind-db-attach
|
||||
set srcfile $test.c
|
||||
set executable $test
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
if {[build_executable $test.exp $executable $srcfile {debug}] == -1} {
|
||||
standard_testfile .c
|
||||
if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -18,11 +18,8 @@ if [is_remote target] {
|
|||
return 0
|
||||
}
|
||||
|
||||
set test valgrind-infcall
|
||||
set srcfile $test.c
|
||||
set executable $test
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
if {[build_executable $test.exp $executable $srcfile {debug}] == -1} {
|
||||
standard_testfile .c
|
||||
if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
@ -84,7 +81,7 @@ unset gdb_spawn_id
|
|||
set board [host_info name]
|
||||
unset_board_info fileid
|
||||
|
||||
clean_restart $executable
|
||||
clean_restart $testfile
|
||||
|
||||
gdb_test "$vgdbcmd" " in \\.?_start .*" "target remote for vgdb"
|
||||
|
||||
|
|
|
@ -13,21 +13,13 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set testfile value-double-free
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested "Couldn't compile test program"
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
|
||||
untested $testfile.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
# Get things started.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
if ![runto_main] {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -30,9 +30,8 @@
|
|||
|
||||
|
||||
set prototypes 0
|
||||
set testfile "varargs"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
standard_testfile .c
|
||||
|
||||
if [get_compiler_info] {
|
||||
return -1
|
||||
|
@ -56,10 +55,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
|||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
gdb_test_no_output "set print address off"
|
||||
gdb_test_no_output "set width 0"
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
# Test for watchpoints with conditions that involve inferior function
|
||||
# calls.
|
||||
|
||||
set testfile "watch-cond-infcall"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if { [build_executable ${testfile}.exp ${testfile} ${testfile}.c {debug}] } {
|
||||
untested ${testfile}.exp
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
# Tests involving watchpoint conditions with local expressions.
|
||||
#
|
||||
|
||||
set testfile "watch-cond"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c
|
||||
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
|
||||
untested ${testfile}.exp
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
# Tests watchpoints that watch expressions that don't involve memory.
|
||||
#
|
||||
|
||||
set testfile "watch-non-mem"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
|
||||
untested ${testfile}.exp
|
||||
|
|
|
@ -22,8 +22,7 @@
|
|||
# watching the same memory as read watchpoints.
|
||||
#
|
||||
|
||||
set testfile "watch-read"
|
||||
set srcfile ${testfile}.c
|
||||
standard_testfile .c
|
||||
|
||||
if {[skip_hw_watchpoint_access_tests]} {
|
||||
return 0
|
||||
|
|
|
@ -20,9 +20,9 @@ if { [is_remote target] } {
|
|||
return 0
|
||||
}
|
||||
|
||||
global srcfile
|
||||
set testfile "watch-vfork"
|
||||
if { [build_executable ${testfile}.exp ${testfile} ${testfile}.c {debug}] } {
|
||||
standard_testfile .c
|
||||
|
||||
if { [build_executable ${testfile}.exp ${testfile} $srcfile {debug}] } {
|
||||
untested ${testfile}.exp
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -25,9 +25,7 @@ if {[skip_hw_watchpoint_tests]} {
|
|||
return 0
|
||||
}
|
||||
|
||||
set testfile watch_thread_num
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c
|
||||
|
||||
# What compiler are we using?
|
||||
#
|
||||
|
@ -39,10 +37,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
|||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
if { ![runto main] } then {
|
||||
fail "run to main"
|
||||
|
|
|
@ -13,24 +13,18 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set testfile "watchpoint-cond-gone"
|
||||
set srcfile ${testfile}.c
|
||||
set srcfilestripped ${testfile}-stripped.c
|
||||
set objfilestripped ${objdir}/${subdir}/${testfile}-stripped.o
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c watchpoint-cond-gone-stripped.c
|
||||
|
||||
# We need to generate a function without DWARF to crash older GDB.
|
||||
# Stepping into a dynamic function trampoline or stepping out of MAIN may work
|
||||
# but it is not a reliable FAIL case.
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfilestripped}" "${objfilestripped}" object {}] != ""
|
||||
|| [gdb_compile "${srcdir}/${subdir}/${srcfile} ${objfilestripped}" "${binfile}" executable {debug}] != "" } {
|
||||
untested watchpoint-cond-gone.exp
|
||||
if {[prepare_for_testing_full $testfile.exp \
|
||||
[list $testfile debug $srcfile debug $srcfile2 {}]]} {
|
||||
untested $testfile.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
# Problem does not occur otherwise.
|
||||
gdb_test_no_output "set can-use-hw-watchpoints 0"
|
||||
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set testfile "watchpoint-delete"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c
|
||||
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
|
||||
untested ${testfile}.exp
|
||||
|
|
|
@ -18,19 +18,13 @@ if {[skip_hw_watchpoint_tests]} {
|
|||
return 0
|
||||
}
|
||||
|
||||
set testfile watchpoint-hw
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested "Couldn't compile test program"
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
|
||||
untested $testfile.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
# Create the watchpoint before the inferior gets started. Now the native CPU
|
||||
# target is still not active and its `to_can_use_hw_breakpoint' is not
|
||||
# installed, therefore only a software watchpoint gets created.
|
||||
|
|
|
@ -26,10 +26,10 @@ set libfile "watchpoint-solib-shr"
|
|||
set libname "${libfile}.sl"
|
||||
set libsrcfile ${libfile}.c
|
||||
set srcfile $srcdir/$subdir/$testfile.c
|
||||
set binfile $objdir/$subdir/$testfile
|
||||
set shlibdir ${objdir}/${subdir}
|
||||
set binfile [standard_output_file $testfile]
|
||||
set shlibdir [standard_output_file {}]
|
||||
set libsrc $srcdir/$subdir/$libfile.c
|
||||
set lib_sl $objdir/$subdir/$libname
|
||||
set lib_sl [standard_output_file $libname]
|
||||
set lib_dlopen [shlib_target_file ${libname}]
|
||||
set lib_syms [shlib_symbol_file ${libname}]
|
||||
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
# This file was written by Fred Fish. (fnf@cygnus.com)
|
||||
|
||||
|
||||
set testfile "watchpoint"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if [get_compiler_info] {
|
||||
return -1
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
# This file was written by Pierre Muller. (muller@ics.u-strasbg.fr)
|
||||
|
||||
|
||||
set testfile "watchpoints"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
set wp_set 1
|
||||
|
||||
|
@ -26,18 +24,11 @@ if [get_compiler_info] {
|
|||
return -1
|
||||
}
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested watchpoint.exp
|
||||
return -1
|
||||
if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
|
||||
untested $testfile.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load $binfile
|
||||
|
||||
# Disable hardware watchpoints if necessary.
|
||||
if [target_info exists gdb,no_hardware_watchpoints] {
|
||||
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set testfile wchar
|
||||
set srcfile ${testfile}.c
|
||||
standard_testfile .c
|
||||
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -25,9 +25,8 @@ if [target_info exists no_long_long] {
|
|||
set exec_opts [list debug]
|
||||
}
|
||||
|
||||
set testfile whatis
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $exec_opts] != "" } {
|
||||
untested whatis.exp
|
||||
return -1
|
||||
|
@ -41,10 +40,7 @@ if [get_compiler_info] {
|
|||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load $binfile
|
||||
clean_restart $binfile
|
||||
|
||||
# Define a procedure to set up an xfail for all targets that put out a
|
||||
# `long' type as an `int' type.
|
||||
|
|
Loading…
Reference in New Issue