aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-scripts
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-02-13 09:51:17 +1030
committerAlan Modra <amodra@gmail.com>2021-02-14 22:34:27 +1030
commit5b1f6c95704da7128ca2a7c682a2e0ef533180ce (patch)
tree0b17c5490260475e9df6d86e756656257a926e16 /ld/testsuite/ld-scripts
parentf5b2658b0fbef02a855b7bb7288de051cc687237 (diff)
downloadgdb-5b1f6c95704da7128ca2a7c682a2e0ef533180ce.zip
gdb-5b1f6c95704da7128ca2a7c682a2e0ef533180ce.tar.gz
gdb-5b1f6c95704da7128ca2a7c682a2e0ef533180ce.tar.bz2
ld testsuite: change unresolved to unsupported/fail
"unresolved" as a test result means runtest returns an error, which can be confusing when there is no apparent error unless you look in .log files. In particular many tests are skipped without reporting an error if no target C compiler is found, but if a target C compiler is found but won't compile a testcase for some reason we used to mark the test as unresolved. Which is no more worthy of an error than when lacking a C compiler entirely. * testsuite/ld-cdtest/cdtest.exp, * testsuite/ld-checks/checks.exp, * testsuite/ld-elf/binutils.exp, * testsuite/ld-elf/compress.exp, * testsuite/ld-elf/dwarf.exp, * testsuite/ld-elf/exclude.exp, * testsuite/ld-elf/frame.exp, * testsuite/ld-elf/indirect.exp, * testsuite/ld-elf/linux-x86.exp, * testsuite/ld-elf/sec-to-seg.exp, * testsuite/ld-elf/tls_common.exp, * testsuite/ld-elfcomm/elfcomm.exp, * testsuite/ld-elfvers/vers.exp, * testsuite/ld-elfvsb/elfvsb.exp, * testsuite/ld-elfweak/elfweak.exp, * testsuite/ld-ifunc/binutils.exp, * testsuite/ld-mips-elf/mips-elf-flags.exp, * testsuite/ld-misc/defsym.exp, * testsuite/ld-mn10300/mn10300.exp, * testsuite/ld-plugin/lto.exp, * testsuite/ld-plugin/plugin.exp, * testsuite/ld-scripts/align.exp, * testsuite/ld-scripts/assert.exp, * testsuite/ld-scripts/crossref.exp, * testsuite/ld-scripts/defined.exp, * testsuite/ld-scripts/extern.exp, * testsuite/ld-scripts/log2.exp, * testsuite/ld-scripts/map-address.exp, * testsuite/ld-scripts/phdrs.exp, * testsuite/ld-scripts/phdrs2.exp, * testsuite/ld-scripts/script.exp, * testsuite/ld-scripts/section-flags.exp, * testsuite/ld-scripts/sizeof.exp, * testsuite/ld-scripts/weak.exp, * testsuite/ld-selective/selective.exp, * testsuite/ld-sh/sh.exp, * testsuite/ld-shared/shared.exp, * testsuite/ld-srec/srec.exp, * testsuite/ld-tic6x/tic6x.exp, * testsuite/ld-undefined/undefined.exp, * testsuite/ld-undefined/weak-undef.exp, * testsuite/lib/ld-lib.exp: Don't use unresolved except after perror. Instead report "unsupported" or "fail".
Diffstat (limited to 'ld/testsuite/ld-scripts')
-rw-r--r--ld/testsuite/ld-scripts/align.exp2
-rw-r--r--ld/testsuite/ld-scripts/assert.exp2
-rw-r--r--ld/testsuite/ld-scripts/crossref.exp10
-rw-r--r--ld/testsuite/ld-scripts/defined.exp2
-rw-r--r--ld/testsuite/ld-scripts/extern.exp2
-rw-r--r--ld/testsuite/ld-scripts/log2.exp2
-rw-r--r--ld/testsuite/ld-scripts/map-address.exp2
-rw-r--r--ld/testsuite/ld-scripts/phdrs.exp6
-rw-r--r--ld/testsuite/ld-scripts/phdrs2.exp7
-rw-r--r--ld/testsuite/ld-scripts/script.exp2
-rw-r--r--ld/testsuite/ld-scripts/section-flags.exp2
-rw-r--r--ld/testsuite/ld-scripts/sizeof.exp2
-rw-r--r--ld/testsuite/ld-scripts/weak.exp8
13 files changed, 17 insertions, 32 deletions
diff --git a/ld/testsuite/ld-scripts/align.exp b/ld/testsuite/ld-scripts/align.exp
index 197ff6d..db3d30e 100644
--- a/ld/testsuite/ld-scripts/align.exp
+++ b/ld/testsuite/ld-scripts/align.exp
@@ -22,7 +22,7 @@
set testname "align1"
if ![ld_assemble $as $srcdir/$subdir/align.s tmpdir/align.o] {
- unresolved $testname
+ unsupported $testname
return
}
diff --git a/ld/testsuite/ld-scripts/assert.exp b/ld/testsuite/ld-scripts/assert.exp
index 7569051..753f17d 100644
--- a/ld/testsuite/ld-scripts/assert.exp
+++ b/ld/testsuite/ld-scripts/assert.exp
@@ -22,7 +22,7 @@
set testname "ASSERT"
if ![ld_assemble $as $srcdir/$subdir/assert.s tmpdir/assert.o] {
- unresolved $testname
+ unsupported $testname
return
}
diff --git a/ld/testsuite/ld-scripts/crossref.exp b/ld/testsuite/ld-scripts/crossref.exp
index c7f20b1..467b5d5 100644
--- a/ld/testsuite/ld-scripts/crossref.exp
+++ b/ld/testsuite/ld-scripts/crossref.exp
@@ -65,8 +65,8 @@ if [istarget tic6x*-*-*] {
if { ![ld_compile "$CC $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \
|| ![ld_compile "$CC $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" "$srcdir/$subdir/cross2.c" tmpdir/cross2.o] } {
- unresolved $test1
- unresolved $test2
+ unsupported $test1
+ unsupported $test2
set CFLAGS "$old_CFLAGS"
set CC "$old_CC"
return
@@ -99,7 +99,7 @@ if [string match "" $exec_output] then {
# Check cross references within a single object.
if { ![ld_compile "$CC $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" "$srcdir/$subdir/cross3.c" tmpdir/cross3.o] } {
- unresolved $test2
+ unsupported $test2
set CFLAGS "$old_CFLAGS"
set CC "$old_CC"
return
@@ -124,14 +124,14 @@ if [string match "" $exec_output] then {
# Check cross references for ld -r
if { ![ld_compile "$CC $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" "$srcdir/$subdir/cross4.c" tmpdir/cross4.o] } {
- unresolved $test3
+ unsupported $test3
set CFLAGS "$old_CFLAGS"
set CC "$old_CC"
return
}
if ![ld_relocate $ld tmpdir/cross3-partial.o "tmpdir/cross1.o tmpdir/cross4.o"] {
- unresolved $test3
+ fail $test3
set CFLAGS "$old_CFLAGS"
set CC "$old_CC"
return
diff --git a/ld/testsuite/ld-scripts/defined.exp b/ld/testsuite/ld-scripts/defined.exp
index 309767b..b2c82f2 100644
--- a/ld/testsuite/ld-scripts/defined.exp
+++ b/ld/testsuite/ld-scripts/defined.exp
@@ -23,7 +23,7 @@ set testname "DEFINED"
set prms_id 5699
if ![ld_assemble $as $srcdir/$subdir/defined.s tmpdir/def.o] {
- unresolved $testname
+ unsupported $testname
return
}
diff --git a/ld/testsuite/ld-scripts/extern.exp b/ld/testsuite/ld-scripts/extern.exp
index d095e80..cea55b8 100644
--- a/ld/testsuite/ld-scripts/extern.exp
+++ b/ld/testsuite/ld-scripts/extern.exp
@@ -22,7 +22,7 @@
set testname "EXTERN"
if ![ld_assemble $as $srcdir/$subdir/extern.s tmpdir/extern.o] {
- unresolved $testname
+ unsupported $testname
return
}
diff --git a/ld/testsuite/ld-scripts/log2.exp b/ld/testsuite/ld-scripts/log2.exp
index 7846394..c91dcc1 100644
--- a/ld/testsuite/ld-scripts/log2.exp
+++ b/ld/testsuite/ld-scripts/log2.exp
@@ -22,7 +22,7 @@
set testname "binary logarithm"
if {![ld_assemble $as $srcdir/$subdir/log2.s tmpdir/log2.o]} {
- unresolved $testname
+ unsupported $testname
return
}
diff --git a/ld/testsuite/ld-scripts/map-address.exp b/ld/testsuite/ld-scripts/map-address.exp
index 587a98d..9e6f2dc 100644
--- a/ld/testsuite/ld-scripts/map-address.exp
+++ b/ld/testsuite/ld-scripts/map-address.exp
@@ -22,7 +22,7 @@ set testname "map addresses"
# The source file doesn't matter. Pinch one from the sizeof test.
if {![ld_assemble $as $srcdir/$subdir/sizeof.s tmpdir/map-address.o]} {
- unresolved $testname
+ unsupported $testname
return
}
diff --git a/ld/testsuite/ld-scripts/phdrs.exp b/ld/testsuite/ld-scripts/phdrs.exp
index e14851b..9edfbbb 100644
--- a/ld/testsuite/ld-scripts/phdrs.exp
+++ b/ld/testsuite/ld-scripts/phdrs.exp
@@ -34,7 +34,7 @@ if { [istarget spu*-*-*] } {
}
if ![ld_assemble $as $srcdir/$subdir/phdrs.s tmpdir/phdrs.o] {
- unresolved $testname
+ unsupported $testname
return
}
@@ -51,10 +51,6 @@ set ldopt "$ldopt -T $srcdir/$subdir/phdrs.t tmpdir/phdrs.o"
if ![ld_link $ld tmpdir/phdrs $ldopt] {
fail $testname
} else {
- if {![is_remote host] && [which $objdump] == 0} {
- unresolved $testname
- return
- }
set exec_output [run_host_cmd "$objdump" "--private-headers tmpdir/phdrs"]
set exec_output [prune_warnings $exec_output]
verbose -log $exec_output
diff --git a/ld/testsuite/ld-scripts/phdrs2.exp b/ld/testsuite/ld-scripts/phdrs2.exp
index edc3297..55b8e326 100644
--- a/ld/testsuite/ld-scripts/phdrs2.exp
+++ b/ld/testsuite/ld-scripts/phdrs2.exp
@@ -43,7 +43,7 @@ if { [istarget spu*-*-*] } {
}
if ![ld_assemble $as $srcdir/$subdir/phdrs2.s tmpdir/phdrs2.o] {
- unresolved $testname
+ unsupported $testname
return
}
@@ -54,11 +54,6 @@ set ldopt "$ldopt -T $srcdir/$subdir/phdrs2.t tmpdir/phdrs2.o"
if ![ld_link $ld tmpdir/phdrs2 $ldopt] {
fail $testname
} else {
- if {![is_remote host] && [which $objdump] == 0} {
- unresolved $testname
- return
- }
-
set exec_output [run_host_cmd "$objdump" "--private-headers tmpdir/phdrs2"]
set exec_output [prune_warnings $exec_output]
verbose -log $exec_output
diff --git a/ld/testsuite/ld-scripts/script.exp b/ld/testsuite/ld-scripts/script.exp
index 222f930..961cd08 100644
--- a/ld/testsuite/ld-scripts/script.exp
+++ b/ld/testsuite/ld-scripts/script.exp
@@ -22,7 +22,7 @@
set testname "script"
if ![ld_assemble $as $srcdir/$subdir/script.s tmpdir/script.o] {
- unresolved $testname
+ unsupported $testname
return
}
diff --git a/ld/testsuite/ld-scripts/section-flags.exp b/ld/testsuite/ld-scripts/section-flags.exp
index 63342a9..f36b52a 100644
--- a/ld/testsuite/ld-scripts/section-flags.exp
+++ b/ld/testsuite/ld-scripts/section-flags.exp
@@ -31,7 +31,7 @@ if { [istarget spu*-*-*] } {
foreach test {"section-flags-1" "section-flags-2"} {
if ![ld_assemble $as $srcdir/$subdir/$test.s tmpdir/$test.o] {
- unresolved $test
+ unsupported $test
} else {
if ![ld_link $ldcmd tmpdir/$test \
"-T $srcdir/$subdir/$test.t tmpdir/$test.o"] {
diff --git a/ld/testsuite/ld-scripts/sizeof.exp b/ld/testsuite/ld-scripts/sizeof.exp
index f8f613a..6d306c8 100644
--- a/ld/testsuite/ld-scripts/sizeof.exp
+++ b/ld/testsuite/ld-scripts/sizeof.exp
@@ -23,7 +23,7 @@
set testname "SIZEOF"
if ![ld_assemble $as $srcdir/$subdir/sizeof.s tmpdir/sizeof.o] {
- unresolved $testname
+ unsupported $testname
return
}
diff --git a/ld/testsuite/ld-scripts/weak.exp b/ld/testsuite/ld-scripts/weak.exp
index 1984ca6..b0f8a9e 100644
--- a/ld/testsuite/ld-scripts/weak.exp
+++ b/ld/testsuite/ld-scripts/weak.exp
@@ -39,7 +39,7 @@ setup_xfail hppa64-*-*
if {! [ld_assemble $as $srcdir/$subdir/weak1.s tmpdir/weak1.o]
|| ! [ld_assemble $as $srcdir/$subdir/weak2.s tmpdir/weak2.o]} then {
# It's OK if .weak doesn't work on this target.
- unresolved $testname
+ unsupported $testname
return
}
@@ -57,12 +57,6 @@ set weak_regexp_little \
if {! [ld_link $ld tmpdir/weak "$flags -T $srcdir/$subdir/weak.t tmpdir/weak1.o tmpdir/weak2.o"] } then {
fail $testname
} else {
- if {![is_remote host] && [which $objdump] == 0} then {
- unresolved $testname
- set LDFLAGS "$saved_LDFLAGS"
- return
- }
-
set exec_output [run_host_cmd "$objdump" "-s tmpdir/weak"]
set exec_output [prune_warnings $exec_output]
verbose -log $exec_output