[gdb/testsuite] Minimize gdb restarts
Minimize gdb restarts, applying the following rules: - don't use prepare_for_testing unless necessary - don't use clean_restart unless necessary Also, if possible, replace build_for_executable + clean_restart with prepare_for_testing for brevity. Touches 68 test-cases. Tested on x86_64-linux.
This commit is contained in:
parent
99d0d99649
commit
98bf5c02cf
68 changed files with 45 additions and 115 deletions
|
@ -27,7 +27,7 @@ standard_testfile .S
|
|||
set options [list debug \
|
||||
additional_flags=-static \
|
||||
additional_flags=-nostartfiles]
|
||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $options] } {
|
||||
if { [build_executable "failed to prepare" ${testfile} ${srcfile} $options] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] == -1} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile {debug}] == -1} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ if { [prepare_for_testing "failed to prepare" $executable "" [list debug pie]] }
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart $executable
|
||||
set arch ""
|
||||
set test "show architecture"
|
||||
gdb_test_multiple $test $test {
|
||||
|
|
|
@ -32,7 +32,7 @@ if [target_info exists gdb,nointerrupts] {
|
|||
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
standard_testfile
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
|
||||
if { [build_executable "failed to prepare" $testfile $srcfile debug] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ if { [prepare_for_testing "failed to prepare" $testfile ${testfile}.c] } {
|
|||
}
|
||||
|
||||
# Check target supports catch syscall or not.
|
||||
clean_restart $binfile
|
||||
if ![runto_main] then {
|
||||
fail "can't run to main"
|
||||
return
|
||||
|
|
|
@ -32,9 +32,6 @@ if [get_compiler_info] {
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
|
||||
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
|
||||
set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
|
||||
set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile2]
|
||||
|
|
|
@ -31,8 +31,6 @@ proc do_test {dir options} {
|
|||
return 0
|
||||
}
|
||||
|
||||
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"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
standard_testfile
|
||||
|
||||
if [prepare_for_testing "failed to prepare" \
|
||||
if [build_executable "failed to prepare" \
|
||||
${testfile} ${srcfile} {debug}] {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ if { [use_gdb_stub] } then {
|
|||
standard_testfile
|
||||
set escapedbinfile [string_to_regexp ${binfile}]
|
||||
|
||||
if [prepare_for_testing "failed to prepare for dprintf-detach" \
|
||||
if [build_executable "failed to prepare for dprintf-detach" \
|
||||
${testfile} ${srcfile} {debug}] {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
standard_testfile
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" ${testfile}] } {
|
||||
if { [build_executable "failed to prepare" ${testfile}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ if [gdb_debug_enabled] {
|
|||
|
||||
standard_testfile
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
|
||||
if { [build_executable "failed to prepare" $testfile $srcfile debug] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -24,9 +24,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile}] } {
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
|
||||
if ![runto setup_done] then {
|
||||
fail "can't run to setup_done"
|
||||
return 0
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile \
|
||||
{debug pie "ldflags=-Wl,-z,relro"}]} {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ if { [have_fuse_ld_gold] == 0} {
|
|||
return -1
|
||||
}
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile \
|
||||
{debug pie "ldflags=-fuse-ld=gold"}]} {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
standard_testfile
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
|
||||
if { [build_executable "failed to prepare" $testfile $srcfile \
|
||||
{debug additional_flags=-Wl,--build-id}] } {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -27,8 +27,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {c}]} {
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
gdb_test_no_output "info variables -q -t int minsym" \
|
||||
"minsym variables do not match type"
|
||||
gdb_test_no_output "info functions -q -t int minsym" \
|
||||
|
|
|
@ -27,8 +27,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile}] } {
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
if ![runto setup_done] then {
|
||||
fail "can't run to setup_done"
|
||||
return 0
|
||||
|
|
|
@ -80,7 +80,7 @@ proc test {cmds_after_kill} {
|
|||
}
|
||||
}
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile] == -1} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile] == -1} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ standard_testfile list0.c list1.c
|
|||
# Need to download the header to the host.
|
||||
gdb_remote_download host ${srcdir}/${subdir}/list0.h
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile $srcfile2] \
|
||||
if {[build_executable "failed to prepare" $testfile [list $srcfile $srcfile2] \
|
||||
{debug}]} {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ if { [target_info gdb_protocol] != "" } {
|
|||
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,4 @@ if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile $srcfile2]
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
gdb_test "info func foo" ".* foo\\(\\).* foo\\(\\).*"
|
||||
|
|
|
@ -46,6 +46,4 @@ proc noreturn_finish_test { } {
|
|||
}
|
||||
}
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
noreturn_finish_test
|
||||
|
|
|
@ -46,6 +46,4 @@ proc noreturn_test { } {
|
|||
}
|
||||
}
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
noreturn_test
|
||||
|
|
|
@ -20,7 +20,7 @@ standard_testfile
|
|||
|
||||
set opts [list debug pie]
|
||||
|
||||
if [prepare_for_testing "failed to prepare" $testfile $srcfile $opts] {
|
||||
if [build_executable "failed to prepare" $testfile $srcfile $opts] {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ if [target_info exists gdb,nointerrupts] {
|
|||
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -46,9 +46,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
|||
return -1
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
clean_restart ${testfile}
|
||||
|
||||
# Using the source command to read commands from a file is important,
|
||||
# otherwise section data is freed and reallocated using the same
|
||||
# memory locations and the bug is not exposed.
|
||||
|
|
|
@ -23,7 +23,7 @@ if { [use_gdb_stub] } {
|
|||
|
||||
standard_testfile
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
|
||||
if { [build_executable "failed to prepare" $testfile $srcfile debug] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -44,8 +44,6 @@ proc simple_func_break_test { protection } {
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
if { ![runto_main] } then {
|
||||
fail "can't run to main"
|
||||
return -1
|
||||
|
|
|
@ -30,7 +30,7 @@ if { [is_remote target] } {
|
|||
|
||||
standard_testfile
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
|
||||
if { [build_executable "failed to prepare" $testfile $srcfile debug] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -35,8 +35,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
|||
return -1
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
clean_restart ${testfile}
|
||||
if ![runto_main] {
|
||||
fail "can't run to main"
|
||||
return -1
|
||||
|
|
|
@ -30,8 +30,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart $binfile
|
||||
|
||||
if ![runto_main] {
|
||||
untested "can't run to main"
|
||||
return -1
|
||||
|
|
|
@ -51,8 +51,6 @@ proc do_test {dir options} {
|
|||
return 0
|
||||
}
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
#
|
||||
# Test whatis command with basic C types
|
||||
#
|
||||
|
|
|
@ -581,8 +581,6 @@ proc do_tests {} {
|
|||
global binfile
|
||||
global dm_type_int_star
|
||||
|
||||
clean_restart $binfile
|
||||
|
||||
gdb_test_no_output "set width 0"
|
||||
|
||||
runto_main
|
||||
|
|
|
@ -20,7 +20,7 @@ if {[skip_cplus_tests]} { continue }
|
|||
|
||||
standard_testfile .cc
|
||||
|
||||
if {[prepare_for_testing $testfile.exp $testfile $srcfile \
|
||||
if {[build_executable $testfile.exp $testfile $srcfile \
|
||||
{debug c++ additional_flags="-std=gnu++11"}] == -1} {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -25,8 +25,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart $testfile
|
||||
|
||||
if ![runto_main] {
|
||||
untested "could not run to main"
|
||||
return -1
|
||||
|
|
|
@ -27,8 +27,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart $testfile
|
||||
|
||||
if ![runto_main] {
|
||||
untested "could not run to main"
|
||||
return -1
|
||||
|
|
|
@ -24,7 +24,7 @@ if {![dwarf2_support]} {
|
|||
|
||||
standard_testfile .S main.c
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" ${testfile} \
|
||||
if { [build_executable "failed to prepare" ${testfile} \
|
||||
[list $srcfile $srcfile2] {nodebug}] } {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -27,12 +27,6 @@ standard_testfile main.c .S
|
|||
set executable ${testfile}
|
||||
set asm_file [standard_output_file ${srcfile2}]
|
||||
|
||||
# We need to know the size of integer types in order to write some of the
|
||||
# debugging info we'd like to generate.
|
||||
if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] {
|
||||
return -1
|
||||
}
|
||||
|
||||
# Create the DWARF.
|
||||
Dwarf::assemble $asm_file {
|
||||
global srcdir subdir srcfile
|
||||
|
@ -83,8 +77,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
# Expand cu1. This will enqueue cu2.
|
||||
gdb_test "ptype foo" "type = int"
|
||||
|
||||
|
|
|
@ -27,10 +27,6 @@ if {![dwarf2_support]} {
|
|||
|
||||
standard_testfile .c -dw.S
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
set asm_file [standard_output_file $srcfile2]
|
||||
Dwarf::assemble $asm_file {
|
||||
global srcfile binfile objdir
|
||||
|
|
|
@ -25,10 +25,6 @@ if {![dwarf2_support]} {
|
|||
|
||||
standard_testfile .c -dw.S
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
set asm_file [standard_output_file $srcfile2]
|
||||
Dwarf::assemble $asm_file {
|
||||
global srcfile gdb_test_file_name
|
||||
|
|
|
@ -38,7 +38,7 @@ if {[skip_fortran_tests]} { return -1 }
|
|||
standard_testfile ".f90"
|
||||
load_lib fortran.exp
|
||||
|
||||
if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
|
||||
if {[build_executable ${testfile}.exp ${testfile} ${srcfile} \
|
||||
{debug f90}]} {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ load_lib "fortran.exp"
|
|||
|
||||
standard_testfile ".f90"
|
||||
|
||||
if {[prepare_for_testing ${testfile}.exp ${testfile} \
|
||||
if {[build_executable ${testfile}.exp ${testfile} \
|
||||
${srcfile} {debug f90}]} {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -27,11 +27,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
|
|||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
if ![fortran_runto_main] then {
|
||||
perror "couldn't run to main"
|
||||
continue
|
||||
|
|
|
@ -24,7 +24,7 @@ set do_xml_test [expr ![gdb_skip_xml_test]]
|
|||
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ set MIFLAGS "-i=mi"
|
|||
|
||||
standard_testfile "mi-fortran-modules.f90" "mi-fortran-modules-2.f90"
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" ${testfile} \
|
||||
if {[build_executable "failed to prepare" ${testfile} \
|
||||
[list $srcfile2 $srcfile] {debug f90}]} {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ set MIFLAGS "-i=mi"
|
|||
|
||||
standard_testfile .c -base.c
|
||||
|
||||
if {[prepare_for_testing $testfile.exp $testfile \
|
||||
if {[build_executable $testfile.exp $testfile \
|
||||
[list $srcfile $srcfile2] debug]} {
|
||||
untested $testfile.exp
|
||||
return -1
|
||||
|
|
|
@ -27,7 +27,7 @@ set MIFLAGS "-i=mi"
|
|||
standard_testfile .cc
|
||||
set exefile $testfile
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $exefile $srcfile {debug c++}]} {
|
||||
if {[build_executable "failed to prepare" $exefile $srcfile {debug c++}]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ set MIFLAGS "-i=mi"
|
|||
|
||||
standard_testfile mi-sym-info-1.c mi-sym-info-2.c
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" ${testfile} \
|
||||
if {[build_executable "failed to prepare" ${testfile} \
|
||||
[list $srcfile $srcfile2] {debug}]} {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -24,8 +24,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {pthreads d
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
if { ![runto_main] } then {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ if [istarget "s390*-*-*"] {
|
|||
set march2 "-m32"
|
||||
}
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" ${exec1} "${srcfile1}" \
|
||||
if { [build_executable "failed to prepare" ${exec1} "${srcfile1}" \
|
||||
[list debug additional_flags=${march1}]] } {
|
||||
return -1
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ if [istarget "aarch64*-*-*"] {
|
|||
lappend options "additional_flags=${march2}"
|
||||
}
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" ${exec2} "${srcfile2}" \
|
||||
if { [build_executable "failed to prepare" ${exec2} "${srcfile2}" \
|
||||
$options]} {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -31,14 +31,14 @@ set srcfile2 multi-re-run-2.c
|
|||
set binfile2 [standard_output_file ${exec2}]
|
||||
|
||||
with_test_prefix "exec1" {
|
||||
if { [prepare_for_testing "failed to prepare" ${exec1} "${srcfile1}" \
|
||||
if { [build_executable "failed to prepare" ${exec1} "${srcfile1}" \
|
||||
[list pthreads debug]] } {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
with_test_prefix "exec2" {
|
||||
if { [prepare_for_testing "failed to prepare" ${exec2} "${srcfile2}" \
|
||||
if { [build_executable "failed to prepare" ${exec2} "${srcfile2}" \
|
||||
[list pthreads debug]] } {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ if {[use_gdb_stub]} {
|
|||
return 0
|
||||
}
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile {debug}]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
|
||||
standard_testfile
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {pthreads debug}] } {
|
||||
if { [build_executable "failed to prepare" ${testfile} ${srcfile} \
|
||||
{pthreads debug}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -31,8 +31,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {pthreads d
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
if { ![runto_main] } then {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -24,9 +24,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
|||
return -1
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
clean_restart ${testfile}
|
||||
|
||||
# Skip all tests if Python scripting is not enabled.
|
||||
if { [skip_python_tests] } { continue }
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ if {[skip_gdbserver_tests]} {
|
|||
standard_testfile
|
||||
set executable ${testfile}
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ foreach_with_prefix test { exit signal } {
|
|||
set func "run_${test}_test"
|
||||
|
||||
set executable "$binfile-${test}"
|
||||
if [prepare_for_testing "failed to prepare" $executable $srcfile \
|
||||
if [build_executable "failed to prepare" $executable $srcfile \
|
||||
[list debug pthreads additional_flags=-D${def}]] {
|
||||
return -1
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ if {[skip_gdbserver_tests]} {
|
|||
|
||||
standard_testfile normal.c
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -62,8 +62,6 @@ proc test {} {
|
|||
global gdb_prompt
|
||||
global decimal
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
set test_spawn_id [spawn_wait_for_attach $binfile]
|
||||
set testpid [spawn_id_get_pid $test_spawn_id]
|
||||
|
||||
|
@ -170,7 +168,8 @@ proc test {} {
|
|||
# failure.
|
||||
set options { "additional_flags=-DTIMEOUT=$timeout" debug pthreads }
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options] == -1} {
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
|
||||
$options] == -1} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,6 @@ if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] {
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
set test_spawn_id [spawn_wait_for_attach $binfile]
|
||||
set testpid [spawn_id_get_pid $test_spawn_id]
|
||||
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile \
|
||||
{debug pthreads}] == -1} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,8 @@ if [target_info exists gdb,nosignals] {
|
|||
return -1
|
||||
}
|
||||
|
||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
|
||||
if {[build_executable "failed to prepare" $testfile $srcfile \
|
||||
{debug pthreads}]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart $binfile
|
||||
|
||||
if ![runto_main] {
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -22,8 +22,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile { debug pthreads
|
|||
return -1
|
||||
}
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
if ![runto_main] {
|
||||
fail "can't run to main"
|
||||
return -1
|
||||
|
|
|
@ -25,7 +25,6 @@ standard_testfile
|
|||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nopie}]} {
|
||||
return -1
|
||||
}
|
||||
clean_restart $testfile
|
||||
|
||||
if ![runto_main] {
|
||||
fail "can't run to main to check for trace support"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue