diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-07-13 19:20:39 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-07-13 19:20:39 +0000 |
commit | aa81e255f3c6846b3e7da7e0bc2f36f15c6146da (patch) | |
tree | 4e921f2eccbf4b32eb8265e683a1b3b998a0e0da /gdb | |
parent | 37bbf52bcd8c9441923932db42d6db4400cb92c9 (diff) | |
download | gdb-aa81e255f3c6846b3e7da7e0bc2f36f15c6146da.zip gdb-aa81e255f3c6846b3e7da7e0bc2f36f15c6146da.tar.gz gdb-aa81e255f3c6846b3e7da7e0bc2f36f15c6146da.tar.bz2 |
gdb/testsuite/
Fix racy clashing of output files for gdb.base{1,2}/ parallel run.
* gdb.base/annota1.exp (thread_test): Import global $testfile.
Change the compilation target to match the testcase name.
* gdb.base/sect-cmd.exp: Change the compilation target to match the
testcase name.
* a2-run.exp: Use for setup prepare_for_testing. Change the
compilation target to match the testcase name.
* gdb.base/commands.exp: Likewise.
* gdb.base/finish.exp: Likewise.
* gdb.base/float.exp: Likewise.
* gdb.base/info-target.exp: Likewise.
* gdb.base/relational.exp: Likewise.
* gdb.base/term.exp: Likewise.
* gdb.base/until.exp: Likewise.
* gdb.base/volatile.exp: Likewise.
* gdb.base/whatis-exp.exp: Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 19 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/a2-run.exp | 12 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/annota1.exp | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/commands.exp | 14 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/finish.exp | 15 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/float.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/info-target.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/relational.exp | 20 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/sect-cmd.exp | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/term.exp | 14 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/until.exp | 26 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/volatile.exp | 18 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/whatis-exp.exp | 17 |
13 files changed, 51 insertions, 139 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c0934e3..334fdd1 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,22 @@ +2009-07-13 Jan Kratochvil <jan.kratochvil@redhat.com> + + Fix racy clashing of output files for gdb.base{1,2}/ parallel run. + * gdb.base/annota1.exp (thread_test): Import global $testfile. + Change the compilation target to match the testcase name. + * gdb.base/sect-cmd.exp: Change the compilation target to match the + testcase name. + * a2-run.exp: Use for setup prepare_for_testing. Change the + compilation target to match the testcase name. + * gdb.base/commands.exp: Likewise. + * gdb.base/finish.exp: Likewise. + * gdb.base/float.exp: Likewise. + * gdb.base/info-target.exp: Likewise. + * gdb.base/relational.exp: Likewise. + * gdb.base/term.exp: Likewise. + * gdb.base/until.exp: Likewise. + * gdb.base/volatile.exp: Likewise. + * gdb.base/whatis-exp.exp: Likewise. + 2009-07-11 Hui Zhu <teawater@gmail.com> * gdb.base/help.exp (disassemble): Update expected help text. diff --git a/gdb/testsuite/gdb.base/a2-run.exp b/gdb/testsuite/gdb.base/a2-run.exp index 963c676..f04e717 100644 --- a/gdb/testsuite/gdb.base/a2-run.exp +++ b/gdb/testsuite/gdb.base/a2-run.exp @@ -31,19 +31,11 @@ if $tracelevel then { set prms_id 0 set bug_id 0 -set testfile "run" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested a2-run.exp +set testfile a2-run +if { [prepare_for_testing ${testfile}.exp $testfile run.c] } { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - # Run with no arguments. # On VxWorks this justs make sure the program was run. gdb_run_cmd diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp index 6f4be43..bd714ca 100644 --- a/gdb/testsuite/gdb.base/annota1.exp +++ b/gdb/testsuite/gdb.base/annota1.exp @@ -491,11 +491,10 @@ if [ regexp "core not found" $exec_output] { } proc thread_test {} { - global objdir subdir srcdir + global objdir subdir srcdir testfile global gdb_prompt old_gdb_prompt - set testfile "watch_thread_num" - set srcfile ${testfile}.c - set binfile ${objdir}/${subdir}/${testfile} + set srcfile watch_thread_num.c + set binfile ${objdir}/${subdir}/${testfile}-watch_thread_num set gdb_prompt $old_gdb_prompt if { ![get_compiler_info ${binfile}] && [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] == "" } { diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp index 9839896..2aba51f 100644 --- a/gdb/testsuite/gdb.base/commands.exp +++ b/gdb/testsuite/gdb.base/commands.exp @@ -25,20 +25,10 @@ if $tracelevel then { set prms_id 0 set bug_id 0 -set testfile "run" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/commands -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - untested commands.exp - return -1 +if { [prepare_for_testing commands.exp commands run.c {debug additional_flags=-DFAKEARGV}] } { + return -1 } -gdb_exit -gdb_start -delete_breakpoints -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - proc gdbvar_simple_if_test {} { global gdb_prompt diff --git a/gdb/testsuite/gdb.base/finish.exp b/gdb/testsuite/gdb.base/finish.exp index 6d83d97..4c5a7e2 100644 --- a/gdb/testsuite/gdb.base/finish.exp +++ b/gdb/testsuite/gdb.base/finish.exp @@ -23,12 +23,8 @@ set prms_id 0 set bug_id 0 # re-use the program from the "return2" test. -set testfile "return2" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested finish.exp - return -1 +if { [prepare_for_testing finish.exp finish return2.c] } { + return -1 } proc finish_1 { type } { @@ -128,12 +124,5 @@ proc finish_tests { } { finish_abbreviation "fin" } -# Start with a fresh gdb. - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - set timeout 30 finish_tests diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp index 45040f6..a14a915 100644 --- a/gdb/testsuite/gdb.base/float.exp +++ b/gdb/testsuite/gdb.base/float.exp @@ -29,19 +29,10 @@ if $tracelevel { set prms_id 0 set bug_id 0 -set testfile "run" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested float.exp +if { [prepare_for_testing float.exp float run.c] } { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - # Set it up at a breakpoint so we have its registers. if ![runto_main] then { diff --git a/gdb/testsuite/gdb.base/info-target.exp b/gdb/testsuite/gdb.base/info-target.exp index 793bdbd..bf6ee75 100644 --- a/gdb/testsuite/gdb.base/info-target.exp +++ b/gdb/testsuite/gdb.base/info-target.exp @@ -20,18 +20,11 @@ if $tracelevel then { set prms_id 0 set bug_id 0 -set testfile start -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { +set testfile info-target +if { [prepare_for_testing ${testfile}.exp $testfile start.c] } { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - set eol "\[\r\n\]+" # Check the output of "info target". Note that we are not interested diff --git a/gdb/testsuite/gdb.base/relational.exp b/gdb/testsuite/gdb.base/relational.exp index fcb5fc2..3a1334b 100644 --- a/gdb/testsuite/gdb.base/relational.exp +++ b/gdb/testsuite/gdb.base/relational.exp @@ -31,23 +31,13 @@ if $tracelevel then { set prms_id 0 set bug_id 0 -set testfile "int-type" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } { - untested relational.exp - return -1 - } - -if [get_compiler_info ${binfile}] { - return -1; +if { [prepare_for_testing relational.exp relational int-type.c {debug nowarnings}] } { + return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - +if [get_compiler_info not-used] { + return -1; +} # # set it up at a breakpoint so we can play with the variable values diff --git a/gdb/testsuite/gdb.base/sect-cmd.exp b/gdb/testsuite/gdb.base/sect-cmd.exp index 9913baf..3cef473 100644 --- a/gdb/testsuite/gdb.base/sect-cmd.exp +++ b/gdb/testsuite/gdb.base/sect-cmd.exp @@ -35,9 +35,9 @@ if ![istarget "hppa*-*-hpux*"] then { return } -set testfile "break" -set srcfile ${testfile}.c -set srcfile1 ${testfile}1.c +set testfile "sect-cmd" +set srcfile break.c +set srcfile1 break1.c set binfile ${objdir}/${subdir}/${testfile} if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } { diff --git a/gdb/testsuite/gdb.base/term.exp b/gdb/testsuite/gdb.base/term.exp index 6275202..de6f58a 100644 --- a/gdb/testsuite/gdb.base/term.exp +++ b/gdb/testsuite/gdb.base/term.exp @@ -38,20 +38,10 @@ gdb_start set prms_id 0 set bug_id 0 -set testfile "run" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested term.exp - return -1 +if { [prepare_for_testing term.exp term run.c] } { + return -1 } -gdb_exit -gdb_start -delete_breakpoints -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - gdb_test "set print sevenbit-strings" "" "test set print sevenbit-strings" gdb_test "set print address off" "" "test set print address off" gdb_test "set width 0" "" "test set width 0" diff --git a/gdb/testsuite/gdb.base/until.exp b/gdb/testsuite/gdb.base/until.exp index dbc266b..8c59430 100644 --- a/gdb/testsuite/gdb.base/until.exp +++ b/gdb/testsuite/gdb.base/until.exp @@ -19,31 +19,11 @@ if $tracelevel then { strace $tracelevel } -set testfile "break" -set srcfile ${testfile}.c -set srcfile1 ${testfile}1.c -set binfile ${objdir}/${subdir}/${testfile} - -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } { - untested until.exp - return -1 -} - -if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } { - untested until.exp - return -1 +set srcfile break.c +if { [prepare_for_testing until.exp "until" {break.c break1.c} {debug nowarnings}] } { + return -1 } -if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } { - untested until.exp - return -1 -} - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] set bp_location19 [gdb_get_line_number "set breakpoint 19 here"] set bp_location20 [gdb_get_line_number "set breakpoint 20 here"] diff --git a/gdb/testsuite/gdb.base/volatile.exp b/gdb/testsuite/gdb.base/volatile.exp index d616735..c45b0ae 100644 --- a/gdb/testsuite/gdb.base/volatile.exp +++ b/gdb/testsuite/gdb.base/volatile.exp @@ -42,26 +42,16 @@ set bug_id 0 # Use the same test program constvars.c. -set testfile "constvars" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +if { [prepare_for_testing volatile.exp volatile constvars.c] } { + return -1 +} # Create and source the file that provides information about the compiler # used to compile the test case. -if [get_compiler_info ${binfile}] { +if [get_compiler_info not-used] { return -1; } -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug ] != "" } { - untested volatile.exp - return -1 -} - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - # # set it up at a breakpoint so we can play with the variable values # diff --git a/gdb/testsuite/gdb.base/whatis-exp.exp b/gdb/testsuite/gdb.base/whatis-exp.exp index abea627..514fac9 100644 --- a/gdb/testsuite/gdb.base/whatis-exp.exp +++ b/gdb/testsuite/gdb.base/whatis-exp.exp @@ -35,20 +35,9 @@ if $tracelevel then { set prms_id 0 set bug_id 0 -set testfile "int-type" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } { - untested whatis-exp.exp - return -1 - } - - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - +if { [prepare_for_testing whatis-exp.exp whatis-exp int-type.c {debug nowarnings}] } { + return -1 +} # # set it up at a breakpoint so we can play with the variable values |