summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-08-22 13:39:13 +0000
committerTom Tromey <tromey@redhat.com>2013-08-22 13:39:13 +0000
commit7a218f88658c03a85051a8b6d1aac59541e697ff (patch)
tree5e8e7482e707a2c48e3c70cc5f517ff729f5a859
parent3ce958b2ab9f0d1f6c4f12bdc42ea7e8cb21dd6a (diff)
downloadppe42-binutils-7a218f88658c03a85051a8b6d1aac59541e697ff.tar.gz
ppe42-binutils-7a218f88658c03a85051a8b6d1aac59541e697ff.zip
fix some gdb.dwarf2 tests for parallel safety
This fixes a few gdb.dwarf2 tests to be more parallel-safe. This mostly amounts to changing them to write their files into the directory designated by standard_output_file. Built and regtested on x86-64 Fedora 18. * gdb.dwarf2/clztest.exp: Use standard_testfile. * gdb.dwarf2/dw2-minsym-in-cu.exp: Use standard_testfile. * gdb.dwarf2/fission-base.S: Remove directory from DW_AT_GNU_dwo_name. * gdb.dwarf2/fission-base.exp: Use build_executable. Set debug-file-directory. * gdb.dwarf2/fission-reread.S: Remove directory from DW_AT_GNU_dwo_name. * gdb.dwarf2/fission-reread.exp: Use build_executable. Set debug-file-directory.
-rw-r--r--gdb/testsuite/ChangeLog13
-rw-r--r--gdb/testsuite/gdb.dwarf2/clztest.exp1
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-base.S5
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-base.exp11
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-reread.S7
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-reread.exp11
7 files changed, 39 insertions, 15 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 661042e340..f32933885d 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,16 @@
+2013-08-22 Tom Tromey <tromey@redhat.com>
+
+ * gdb.dwarf2/clztest.exp: Use standard_testfile.
+ * gdb.dwarf2/dw2-minsym-in-cu.exp: Use standard_testfile.
+ * gdb.dwarf2/fission-base.S: Remove directory from
+ DW_AT_GNU_dwo_name.
+ * gdb.dwarf2/fission-base.exp: Use build_executable. Set
+ debug-file-directory.
+ * gdb.dwarf2/fission-reread.S: Remove directory from
+ DW_AT_GNU_dwo_name.
+ * gdb.dwarf2/fission-reread.exp: Use build_executable. Set
+ debug-file-directory.
+
2013-08-16 Doug Evans <dje@google.com>
* lib/prelink-support.exp (prelink_yes): Flag test as unsupported if
diff --git a/gdb/testsuite/gdb.dwarf2/clztest.exp b/gdb/testsuite/gdb.dwarf2/clztest.exp
index 127fbdfd87..0874342dab 100644
--- a/gdb/testsuite/gdb.dwarf2/clztest.exp
+++ b/gdb/testsuite/gdb.dwarf2/clztest.exp
@@ -15,6 +15,7 @@
load_lib dwarf.exp
+standard_testfile .S
set test "clztest"
# This test can only be run on targets which support DWARF-2 and use gas.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp b/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
index 105123f62f..9b2a8054bf 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
@@ -21,11 +21,9 @@ if {![dwarf2_support]} {
# This testfile has reproducibility only with cc-with-index.sh.
-set testfile "dw2-minsym-in-cu"
-set srcfile ${testfile}.S
-set executable ${testfile}
+standard_testfile .S
-if [prepare_for_testing ${testfile}.exp ${executable} ${srcfile}] {
+if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] {
return -1
}
diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.S b/gdb/testsuite/gdb.dwarf2/fission-base.S
index 23de5a7131..14b2494495 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-base.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-base.S
@@ -145,10 +145,7 @@ main:
.ascii "/tmp/src/gdb/testsuite\0" # DW_AT_comp_dir
# Normally dwo_name would be "fission-base.dwo".
# Simplification: Leave the DWO contents in the executable.
- # "gdb.dwarf2/" is included so that gdb can load the file without
- # having to set "debug-file-directory". This is useful when
- # testing with cc-with-tweaks.sh -i.
- .ascii "gdb.dwarf2/fission-base\0" # DW_AT_GNU_dwo_name
+ .ascii "fission-base\0" # DW_AT_GNU_dwo_name
.4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
.4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
.4byte .Ldebug_addr0_begin # DW_AT_GNU_addr_base
diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.exp b/gdb/testsuite/gdb.dwarf2/fission-base.exp
index 88e4ff1a3e..58448f8b51 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-base.exp
@@ -29,10 +29,19 @@ set basename "fission-base"
standard_testfile .S
-if { [prepare_for_testing "$testfile.exp" "$testfile" "$srcfile" {nodebug}] } {
+if { [build_executable "$testfile.exp" "$testfile" "$srcfile" {nodebug}] } {
return -1
}
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \
+ "set debug-file-directory"
+
+gdb_load ${binfile}
+
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.S b/gdb/testsuite/gdb.dwarf2/fission-reread.S
index c598824065..e566cc6a45 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-reread.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-reread.S
@@ -135,11 +135,8 @@ main:
.uleb128 0x2 /* (DIE (0) DW_TAG_type_unit) */
.ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
/* Normally dwo_name would be "fission-reread.dwo".
- Simplification: Leave the DWO contents in the executable.
- "gdb.dwarf2/" is included so that gdb can load the file without
- having to set "debug-file-directory". This is useful when
- testing with cc-with-tweaks.sh -i. */
- .ascii "gdb.dwarf2/fission-reread\0" /* DW_AT_GNU_dwo_name */
+ Simplification: Leave the DWO contents in the executable. */
+ .ascii "fission-reread\0" /* DW_AT_GNU_dwo_name */
.4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
.4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
.4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.exp b/gdb/testsuite/gdb.dwarf2/fission-reread.exp
index 0f06326f2e..f275308d47 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-reread.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-reread.exp
@@ -24,10 +24,19 @@ set basename "fission-reread"
standard_testfile .S
-if { [prepare_for_testing "$testfile.exp" "$testfile" "$srcfile" {nodebug}] } {
+if { [build_executable "$testfile.exp" "$testfile" "$srcfile" {nodebug}] } {
return -1
}
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \
+ "set debug-file-directory"
+
+gdb_load ${binfile}
+
gdb_test "break main" "Breakpoint.*at.*"
# If we get this far gdb didn't crash, nor did an error occur.
OpenPOWER on IntegriCloud