From: Pedro Alves Date: Fri, 18 Jun 2010 15:08:29 +0000 (+0000) Subject: * gdb.multi/base.exp, gdb.multi/bkpt-multi-exec.exp: Use X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8053d4d67fd1bed2aac3f56dd65baea1a0a7471;p=binutils-gdb.git * gdb.multi/base.exp, gdb.multi/bkpt-multi-exec.exp: Use clean_restart, make sure every test has a distinct message, and that messages don't include the executable' full path. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a03113f84c6..f647c5608fd 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-06-18 Pedro Alves + + * gdb.multi/base.exp, gdb.multi/bkpt-multi-exec.exp: Use + clean_restart, make sure every test has a distinct message, and + that messages don't include the executable' full path. + 2010-06-17 Doug Evans * gdb.arch/i386-size.exp: Updated expected output for diff --git a/gdb/testsuite/gdb.multi/base.exp b/gdb/testsuite/gdb.multi/base.exp index b55d4d93469..53986ea38df 100644 --- a/gdb/testsuite/gdb.multi/base.exp +++ b/gdb/testsuite/gdb.multi/base.exp @@ -42,20 +42,19 @@ if { [prepare_for_testing ${testfile}.exp ${exec3} "${srcfile3}" {debug nowarnin return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile1} +clean_restart ${exec1} # Add an empty inferior space, switch to it, and load a main # executable into it. -gdb_test "add-inferior" "Added inferior 2.*" -gdb_test "inferior 2" "Switching to inferior 2.*" -gdb_test "file ${binfile2}" ".*" +gdb_test "add-inferior" "Added inferior 2.*" "add empty inferior 2" +gdb_test "inferior 2" "Switching to inferior 2.*" "switch to inferior 2" +gdb_test "file ${binfile2}" ".*" "load ${exec2} file in inferior 2" # Add a new inferior space and load a main executable into it in one # command. -gdb_test "add-inferior -exec ${binfile3}" +gdb_test "add-inferior -exec ${binfile3}" \ + "Added inferior 3.*" \ + "add inferior 3 with -exec ${exec3}" # Check that we have multiple spaces. @@ -64,35 +63,38 @@ gdb_test "info inferiors" \ # Test that we have multiple symbol tables. -gdb_test "inferior 1" -gdb_test "info functions commonfun" "${srcfile1}.*" +gdb_test "inferior 1" ".*" "switch to inferior 1" +gdb_test "info functions commonfun" \ + "${srcfile1}.*" \ + "'info functions commonfun' in inferior 1" -gdb_test "inferior 3" -gdb_test "info functions commonfun" "${srcfile3}.*" +gdb_test "inferior 3" ".*" "switch to inferior 3" +gdb_test "info functions commonfun" \ + "${srcfile3}.*" \ + "'info functions commonfun' in inferior 3" - -gdb_test "inferior 1" +gdb_test "inferior 1" ".*" "switch back to inferior 1" gdb_test_no_output "set listsize 1" -gdb_test "list commonfun" "from hello.*" +gdb_test "list commonfun" "from hello.*" "list commonfun in hello" gdb_test "print hglob" "1" gdb_test "print glob" "92" "print glob (${exec1})" -gdb_test "inferior 3" +gdb_test "inferior 3" ".*" "switch to inferior 3 to print globals" gdb_test "print gglob" "2" gdb_test "print glob" "45" "print glob (${exec3})" -gdb_test "list commonfun" "from goodbye.*" +gdb_test "list commonfun" "from goodbye.*" "list commonfun in goodbye" # Let's run the hello program. -gdb_test "inferior 1" +gdb_test "inferior 1" ".*" "switch to inferior 1 to run it" if { ![runto_main] } then { return -1 diff --git a/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp b/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp index 1fe24f6447c..39b39adf38c 100644 --- a/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp +++ b/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp @@ -42,10 +42,7 @@ if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then { # Start with a fresh gdb -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile1} +clean_restart ${exec1} # Start the program running, and stop at main. # @@ -61,12 +58,11 @@ gdb_test "continue" "SIGSEGV.*" # Start over, but this time, set a breakpoint before the app crashes. -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile1} +clean_restart ${exec1} -gdb_test "add-inferior -exec ${binfile2}" +gdb_test "add-inferior -exec ${binfile2}" \ + "Added inferior 2.*" \ + "add inferior 2 with -exec ${exec2}" set bp_location [gdb_get_line_number "set breakpoint here" ${srcfile2}]