diff options
author | Alan Modra <amodra@gmail.com> | 2021-02-13 09:51:17 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-02-14 22:34:27 +1030 |
commit | 5b1f6c95704da7128ca2a7c682a2e0ef533180ce (patch) | |
tree | 0b17c5490260475e9df6d86e756656257a926e16 /ld | |
parent | f5b2658b0fbef02a855b7bb7288de051cc687237 (diff) | |
download | gdb-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')
43 files changed, 220 insertions, 209 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 16c6f2f..26fbe40 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,49 @@ +2021-02-14 Alan Modra <amodra@gmail.com> + + * 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". + 2021-02-12 Nick Clifton <nickc@redhat.com> * testsuite/ld-elf/sec64k.exp: Stop readelf from automatically diff --git a/ld/testsuite/ld-cdtest/cdtest.exp b/ld/testsuite/ld-cdtest/cdtest.exp index b3279be..8011980 100644 --- a/ld/testsuite/ld-cdtest/cdtest.exp +++ b/ld/testsuite/ld-cdtest/cdtest.exp @@ -41,8 +41,8 @@ if { [which $CXX] == 0 } { if { ![ld_compile "$CXX $CXXFLAGS -fno-exceptions" $srcdir/$subdir/cdtest-foo.cc tmpdir/cdtest-foo.o] || ![ld_compile "$CXX $CXXFLAGS -fno-exceptions" $srcdir/$subdir/cdtest-bar.cc tmpdir/cdtest-bar.o] || ![ld_compile "$CXX $CXXFLAGS -fno-exceptions" $srcdir/$subdir/cdtest-main.cc tmpdir/cdtest-main.o] } { - unresolved $test1 - unresolved $test2 + unsupported $test1 + unsupported $test2 return } diff --git a/ld/testsuite/ld-checks/checks.exp b/ld/testsuite/ld-checks/checks.exp index 7abd1cd..3cf9c5b 100644 --- a/ld/testsuite/ld-checks/checks.exp +++ b/ld/testsuite/ld-checks/checks.exp @@ -36,7 +36,7 @@ proc section_check {} { set ldflags "$LDFLAGS --check-sections -e foo" if { ![ld_assemble $as $srcdir/$subdir/asm.s tmpdir/asm.o]} { - unresolved $test + unsupported $test return } diff --git a/ld/testsuite/ld-elf/binutils.exp b/ld/testsuite/ld-elf/binutils.exp index 8784e10..426f329 100644 --- a/ld/testsuite/ld-elf/binutils.exp +++ b/ld/testsuite/ld-elf/binutils.exp @@ -53,17 +53,17 @@ proc binutils_test { prog_name ld_options test {test_name ""} {readelf_options " } if { ![ld_assemble $as $srcdir/$subdir/$test.s tmpdir/$test.o ] } { - unresolved "$test_name" + unsupported "$test_name" return } if { ![ld_link $ld tmpdir/$test "$ld_options -z stack-size=0 tmpdir/$test.o"] } { if { [string match "*not supported*" $link_output] || [string match "*unrecognized option*" $link_output] - || [string match "*-z relro ignored*" $link_output] } { + || [string match "*-z * ignored*" $link_output] } { unsupported "$ld_options is not supported by this target" } else { - unresolved "$test_name" + fail "$test_name" } return } @@ -72,7 +72,7 @@ proc binutils_test { prog_name ld_options test {test_name ""} {readelf_options " set got [remote_exec host "$READELF $readelf_options --wide tmpdir/$test" "" "/dev/null" "tmpdir/$test.exp"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" return } @@ -134,7 +134,7 @@ proc binutils_test { prog_name ld_options test {test_name ""} {readelf_options " set got [remote_exec host "$READELF $readelf_options --wide tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" return } diff --git a/ld/testsuite/ld-elf/compress.exp b/ld/testsuite/ld-elf/compress.exp index 6e66c9b..2d28994 100644 --- a/ld/testsuite/ld-elf/compress.exp +++ b/ld/testsuite/ld-elf/compress.exp @@ -129,7 +129,7 @@ send_log "$READELF -S -W tmpdir/$test.o > tmpdir/$test.out\n" set got [remote_exec host "$READELF -S -W tmpdir/$test.o" "" "/dev/null" "tmpdir/$test.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" } if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rS] } then { fail "$test_name" @@ -143,7 +143,7 @@ send_log "$READELF -S -W tmpdir/$test.o > tmpdir/$test.out\n" set got [remote_exec host "$READELF -S -W tmpdir/$test.o" "" "/dev/null" "tmpdir/$test.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" } if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rS] } then { fail "$test_name" @@ -157,7 +157,7 @@ send_log "$READELF -t -W tmpdir/$test.o > tmpdir/$test.out\n" set got [remote_exec host "$READELF -t -W tmpdir/$test.o" "" "/dev/null" "tmpdir/$test.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" } if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rt] } then { fail "$test_name" @@ -171,7 +171,7 @@ send_log "$READELF -w tmpdir/$test > tmpdir/$test.out\n" set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test > tmpdir/$test.out"]] "" "/dev/null"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" } set test_name "Link with zlib compressed debug output 2" @@ -180,7 +180,7 @@ send_log "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$te set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out"]] "" "/dev/null"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" } if { [catch {exec cmp tmpdir/normal.out tmpdir/$test.out}] } then { send_log "tmpdir/normal.out tmpdir/$test.out differ.\n" @@ -193,7 +193,7 @@ send_log "$READELF -S -W tmpdir/$test' > tmpdir/$test.out\n" set got [remote_exec host "$READELF -S -W tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" } if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rS] } then { fail "$test_name" @@ -207,7 +207,7 @@ send_log "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$te set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out"]] "" "/dev/null"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" } if { [catch {exec cmp tmpdir/normal.out tmpdir/$test.out}] } then { send_log "tmpdir/normal.out tmpdir/$test.out differ.\n" @@ -220,7 +220,7 @@ send_log "$READELF -S -W tmpdir/$test' > tmpdir/$test.out\n" set got [remote_exec host "$READELF -S -W tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" } if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rS] } then { fail "$test_name" @@ -234,7 +234,7 @@ send_log "$READELF -w tmpdir/$test > tmpdir/$test.out\n" set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test > tmpdir/$test.out"]] "" "/dev/null"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" } if { [catch {exec cmp tmpdir/normal.out tmpdir/$test.out}] } then { send_log "tmpdir/normal.out tmpdir/$test.out differ.\n" @@ -247,7 +247,7 @@ send_log "$READELF -t -W tmpdir/$test > tmpdir/$test.out\n" set got [remote_exec host "$READELF -t -W tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" } if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rt] } then { fail "$test_name" diff --git a/ld/testsuite/ld-elf/dwarf.exp b/ld/testsuite/ld-elf/dwarf.exp index a02b069..e620651 100644 --- a/ld/testsuite/ld-elf/dwarf.exp +++ b/ld/testsuite/ld-elf/dwarf.exp @@ -85,7 +85,7 @@ proc strip_test {} { set prog $strip if ![ld_link $ld tmpdir/$test "-shared tmpdir/dwarf1.o"] { - unresolved "$test_name" + fail "$test_name" return } @@ -93,7 +93,7 @@ proc strip_test {} { catch "exec $NM -D tmpdir/$test > tmpdir/$test.exp" got if ![string match "" $got] then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" return } @@ -109,7 +109,7 @@ proc strip_test {} { catch "exec $NM -D tmpdir/$test > tmpdir/$test.out" got if ![string match "" $got] then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" return } diff --git a/ld/testsuite/ld-elf/exclude.exp b/ld/testsuite/ld-elf/exclude.exp index 8d38330..81869a3 100644 --- a/ld/testsuite/ld-elf/exclude.exp +++ b/ld/testsuite/ld-elf/exclude.exp @@ -51,14 +51,14 @@ set test9 "ld don't exclude symbols from archive - --exclude-libs foo:bar" if { ![ld_assemble_flags $as $as_opt $srcdir/$subdir/exclude1.s tmpdir/exclude1.o ] || ![ld_assemble_flags $as $as_opt $srcdir/$subdir/exclude2.s tmpdir/exclude2.o] } { - unresolved $test1 + unsupported $test1 return } remote_file host delete "tmpdir/libexclude.a" set catch_output [run_host_cmd "$ar" "cq tmpdir/libexclude.a tmpdir/exclude2.o"] if {![string match "" $catch_output]} { - unresolved $test1 + fail $test1 return } diff --git a/ld/testsuite/ld-elf/frame.exp b/ld/testsuite/ld-elf/frame.exp index c95f6b2..b1a964d 100644 --- a/ld/testsuite/ld-elf/frame.exp +++ b/ld/testsuite/ld-elf/frame.exp @@ -57,7 +57,7 @@ set test2 "read-only .gcc_except_table section" if { ![ld_assemble_flags $as $as_opt $srcdir/$subdir/tbss.s tmpdir/tbss.o ] || ![ld_assemble_flags $as $as_opt $srcdir/$subdir/frame.s tmpdir/frame.o] } { - unresolved "$test1" + unsupported "$test1" return } @@ -74,7 +74,7 @@ if { [ld_link $ld tmpdir/frame.so "-z separate-code --shared tmpdir/frame.o tmpd } if ![ld_assemble_flags $as $as_opt $srcdir/$subdir/table.s tmpdir/table.o ] { - unresolved "$test2" + unsupported "$test2" return } diff --git a/ld/testsuite/ld-elf/indirect.exp b/ld/testsuite/ld-elf/indirect.exp index 623ed7e..bd4dab8 100644 --- a/ld/testsuite/ld-elf/indirect.exp +++ b/ld/testsuite/ld-elf/indirect.exp @@ -80,7 +80,7 @@ if { ![ld_compile $cc_cmd $srcdir/$subdir/indirect1a.c tmpdir/indirect1a.o] || ![ld_compile "$cc_cmd -fPIC" $srcdir/$subdir/pr19553c.c tmpdir/pr19553c.o] || ![ld_compile "$cc_cmd -fPIC" $srcdir/$subdir/pr19553b.c tmpdir/pr19553b.o] || ![ld_compile $cc_cmd $srcdir/$subdir/pr19553a.c tmpdir/pr19553a.o] } { - unresolved "Indirect symbol tests" + unsupported "Indirect symbol tests" return } diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp index a16da10..7e3a0b7 100644 --- a/ld/testsuite/ld-elf/linux-x86.exp +++ b/ld/testsuite/ld-elf/linux-x86.exp @@ -84,13 +84,13 @@ proc elfedit_test { options test output } { set got [remote_exec host "$ELFEDIT $options tmpdir/$test" "" "/dev/null"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" } send_log "$READELF -n $options tmpdir/$test > tmpdir/$output.out\n" set got [remote_exec host "$READELF -n tmpdir/$test" "" "/dev/null" "tmpdir/$output.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" } if { [regexp_diff tmpdir/$output.out $srcdir/$subdir/$output.rd] } then { fail "$test_name" diff --git a/ld/testsuite/ld-elf/sec-to-seg.exp b/ld/testsuite/ld-elf/sec-to-seg.exp index 47bafa6..03fdd99 100644 --- a/ld/testsuite/ld-elf/sec-to-seg.exp +++ b/ld/testsuite/ld-elf/sec-to-seg.exp @@ -29,7 +29,7 @@ if {! [is_elf_format] } { if { ! [ld_assemble $as $srcdir/$subdir/sec-to-seg1.s tmpdir/sec-to-seg1.o] || ! [ld_assemble $as $srcdir/$subdir/sec-to-seg2.s tmpdir/sec-to-seg2.o]} then { - unresolved $testname + unsupported $testname return } diff --git a/ld/testsuite/ld-elf/tls_common.exp b/ld/testsuite/ld-elf/tls_common.exp index f8ac926..62276d9 100644 --- a/ld/testsuite/ld-elf/tls_common.exp +++ b/ld/testsuite/ld-elf/tls_common.exp @@ -32,7 +32,7 @@ if { !([istarget *-*-linux*] if { ![ld_assemble $as "--elf-stt-common=no $srcdir/$subdir/tls_common.s" tmpdir/tls_commona.o] || ![ld_assemble $as "--elf-stt-common=yes $srcdir/$subdir/tls_common.s" tmpdir/tls_commonb.o] } { - unresolved "tls_common" + unsupported "tls_common" return } @@ -46,10 +46,8 @@ if { ![ld_link $ld tmpdir/tls_commona "tmpdir/tls_common1a.o"] } { if { [string match "*not supported*" $link_output] || [string match "*unrecognized option*" $link_output] } { unsupported "$ld_options is not supported by this target" - } elseif { [string match "*warning*alignment*of common symbol*" $link_output] } { - fail "tls_common" } else { - unresolved "tls_common" + fail "tls_common" } return } @@ -58,10 +56,8 @@ if { ![ld_link $ld tmpdir/tls_commonb "tmpdir/tls_common1b.o"] } { if { [string match "*not supported*" $link_output] || [string match "*unrecognized option*" $link_output] } { unsupported "$ld_options is not supported by this target" - } elseif { [string match "*warning*alignment*of common symbol*" $link_output] } { - fail "tls_common" } else { - unresolved "tls_common" + fail "tls_common" } return } diff --git a/ld/testsuite/ld-elfcomm/elfcomm.exp b/ld/testsuite/ld-elfcomm/elfcomm.exp index be9bb4f..4e4c92d 100644 --- a/ld/testsuite/ld-elfcomm/elfcomm.exp +++ b/ld/testsuite/ld-elfcomm/elfcomm.exp @@ -54,7 +54,7 @@ proc test_sort_common {} { } if { ![ld_assemble $as $srcdir/$subdir/sort-common.s tmpdir/sort-common.o] } { - unresolved "$test" + unsupported "$test" return 0 } @@ -147,7 +147,7 @@ proc stt_common_test { options testname } { set options "$options tmpdir/common1c.o" if { ! [ld_link $ld tmpdir/common.exe $options] } { - unresolved $testname + fail $testname return 0 } @@ -172,15 +172,14 @@ if [istarget nios2*-*-*] { if { ![ld_compile "$CC $CFLAGS -fcommon $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/common1a.c tmpdir/common1a.o] || ![ld_compile "$CC $CFLAGS -fcommon $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/common1b.c tmpdir/common1b.o] || ![ld_compile "$CC $CFLAGS $NOSANITIZE_CFLAGS $NOLTO_CFLAGS -Wa,--elf-stt-common=yes -fcommon" $srcdir/$subdir/common1b.c tmpdir/common1c.o] } { - unresolved $test1 - unresolved $test1 + unsupported $test1 return } set options "-r tmpdir/common1a.o tmpdir/common1b.o" if { [ld_link $ld tmpdir/common1.o $options] } { - unresolved $test1w1 + fail $test1w1 return } @@ -208,7 +207,7 @@ if { [dump_common1 $test1c1] } { set options "-r tmpdir/common1b.o tmpdir/common1a.o" if { [ld_link $ld tmpdir/common1.o $options] } { - unresolved $test1w2 + fail $test1w2 return } diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp index 5dbe5dc..8a1383f 100644 --- a/ld/testsuite/ld-elfvers/vers.exp +++ b/ld/testsuite/ld-elfvers/vers.exp @@ -105,7 +105,7 @@ proc test_ar { test lib object expect } { set exec_output [prune_warnings $exec_output] if ![string match "" $exec_output] { verbose -log "$exec_output" - unresolved "$test" + fail "$test" return } @@ -493,12 +493,12 @@ proc build_binary { shared pic test source libname other mapfile verexp versymex global NOLTO_CFLAGS if ![ld_compile "$CC -S $pic $CFLAGS $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/$source $tmpdir/$libname.s] { - unresolved "$test" + unsupported "$test" return } if ![ld_assemble $as "$as_options $tmpdir/$libname.s" $tmpdir/$libname.o ] { - unresolved "$test" + unsupported "$test" return } @@ -589,12 +589,12 @@ proc test_ldfail { test flag source execname other mapfile whyfail } { } if ![ld_compile "$CC -S $flag $CFLAGS" $srcdir/$subdir/$source $tmpdir/$execname.s] { - unresolved "$test" + unsupported "$test" return } if ![ld_assemble $as "$as_options $tmpdir/$execname.s" $tmpdir/$execname.o ] { - unresolved "$test" + unsupported "$test" return } @@ -623,7 +623,7 @@ proc test_asfail { test flag source execname whyfail } { global NOLTO_CFLAGS if ![ld_compile "$CC -S $flag $CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/$source $tmpdir/$execname.s] { - unresolved "$test" + unsupported "$test" return } @@ -706,12 +706,12 @@ proc build_exec { test source execname flags solibname verexp versymexp symexp } append cc_cmd " $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" if ![ld_compile $cc_cmd $srcdir/$subdir/$source $tmpdir/$execname.s] { - unresolved "$test" + unsupported "$test" return } if ![ld_assemble $as "$as_options $tmpdir/$execname.s" $tmpdir/$execname.o ] { - unresolved "$test" + unsupported "$test" return } diff --git a/ld/testsuite/ld-elfvsb/elfvsb.exp b/ld/testsuite/ld-elfvsb/elfvsb.exp index 5440ebc..ee73cfe 100644 --- a/ld/testsuite/ld-elfvsb/elfvsb.exp +++ b/ld/testsuite/ld-elfvsb/elfvsb.exp @@ -238,8 +238,8 @@ proc visibility_run {visibility} { # Compile the main program. Make sure that PLT is used since PLT # is expected. if ![ld_compile "$CC -g $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/main.c $tmpdir/mainnp.o] { - unresolved "visibility ($visibility) (non PIC)" - unresolved "visibility ($visibility)" + unsupported "visibility ($visibility) (non PIC)" + unsupported "visibility ($visibility)" } else { # The shared library is composed of two files. First compile them # without using -fpic. That should work on an ELF system, @@ -249,7 +249,7 @@ proc visibility_run {visibility} { # results. Make sure that PLT is used since PLT is expected. if { ![ld_compile "$CC -g $NOPIE_CFLAGS $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o] || ![ld_compile "$CC -g $NOPIE_CFLAGS $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } { - unresolved "visibility ($visibility) (non PIC)" + unsupported "visibility ($visibility) (non PIC)" } else { # SunOS non PIC shared libraries don't permit some cases of # overriding. @@ -338,7 +338,7 @@ proc visibility_run {visibility} { if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o] || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } { - unresolved "visibility ($visibility)" + unsupported "visibility ($visibility)" } else { if { [ string match $visibility "protected" ] || [ string match $visibility "protected_undef_def" ] } { @@ -355,8 +355,8 @@ proc visibility_run {visibility} { } else { # Now do the same tests again, but this time compile main.c PIC. if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS -DSHARED $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] { - unresolved "visibility ($visibility) (PIC main, non PIC so)" - unresolved "visibility ($visibility) (PIC main)" + unsupported "visibility ($visibility) (PIC main, non PIC so)" + unsupported "visibility ($visibility) (PIC main)" } else { if { [ remote_file host exists $tmpdir/sh1np.o ] && [ remote_file host exists $tmpdir/sh2np.o ] } { @@ -395,7 +395,7 @@ proc visibility_run {visibility} { visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o elfvsb } else { - unresolved "visibility (PIC main, non PIC so)" + unsupported "visibility (PIC main, non PIC so)" } if { [ remote_file host exists $tmpdir/sh1p.o ] @@ -408,7 +408,7 @@ proc visibility_run {visibility} { } visibility_test $visibility vmpp "visibility ($visibility) (PIC main)" mainp.o sh1p.o sh2p.o elfvsb } else { - unresolved "visibility ($visibility) (PIC main)" + unsupported "visibility ($visibility) (PIC main)" } }} } @@ -447,7 +447,7 @@ visibility_run protected_weak visibility_run normal if { ![ld_compile "$CC -g $CFLAGS $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/common.c tmpdir/common.o] } { - unresolved "common hidden symbol" + unsupported "common hidden symbol" } else { if ![ld_link $ld tmpdir/common "tmpdir/common.o"] { fail "common hidden symbol" @@ -457,10 +457,10 @@ if { ![ld_compile "$CC -g $CFLAGS $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$sub } if { ![ld_compile "$CC -g $CFLAGS $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/test.c tmpdir/test.o] } { - unresolved "weak hidden symbol" + unsupported "weak hidden symbol" } else { if { ![ld_compile "$CC -g $CFLAGS $NOSANITIZE_CFLAGS $NOLTO_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh3.c tmpdir/sh3.o] } { - unresolved "weak hidden symbol" + unsupported "weak hidden symbol" } else { if ![ld_link $ld tmpdir/sh3.so "-shared tmpdir/sh3.o"] { fail "weak hidden symbol" diff --git a/ld/testsuite/ld-elfweak/elfweak.exp b/ld/testsuite/ld-elfweak/elfweak.exp index 4ec8a50..56949d7 100644 --- a/ld/testsuite/ld-elfweak/elfweak.exp +++ b/ld/testsuite/ld-elfweak/elfweak.exp @@ -394,7 +394,7 @@ if {![ld_compile "$cc_cmd $CFLAGS $picflag" $srcdir/$subdir/foo.c $tmpdir/foo.o] || ![ld_compile "$cc_cmd $CFLAGS $picflag" $srcdir/$subdir/bar1b.c $tmpdir/bar1b.o] || ![ld_compile "$cc_cmd $CFLAGS $picflag" $srcdir/$subdir/bar1c.c $tmpdir/bar1c.o] || ![ld_compile "$cc_cmd $CFLAGS $picflag" $srcdir/$subdir/main1.c $tmpdir/main1.o]} then { - unresolved "ELF weak" + unsupported "ELF weak" } elseif {![ld_link $cc_cmd $tmpdir/libfoo1a.so "$shared $tmpdir/foo1a.o"] || ![ld_link $cc_cmd $tmpdir/libfoo1b.so "$shared $tmpdir/foo1b.o"] || ![ld_link $cc_cmd $tmpdir/libbar1a.so "$shared $tmpdir/bar1a.o $tmpdir/libfoo1a.so"]} then { @@ -428,7 +428,7 @@ if {![ld_compile "$cc_cmd $CFLAGS $picflag" $srcdir/$subdir/size_foo.c $tmpdir/s || ![ld_compile "$cc_cmd $CFLAGS $picflag" $srcdir/$subdir/size_bar.c $tmpdir/size_bar_s.o] || ![ld_compile "$cc_cmd $CFLAGS $picflag -DSIZE_BIG" $srcdir/$subdir/size_bar.c $tmpdir/size_bar.o] || ![ld_compile "$cc_cmd $CFLAGS" $srcdir/$subdir/size_main.c $tmpdir/size_main.o]} then { - unresolved "ELF weak (size)" + unsupported "ELF weak (size)" } else { build_lib "ELF DSO small bar (size)" libsize_bar_s "size_bar_s.o" "" build_lib "ELF DSO foo with small bar (size)" libsize_foo "size_foo.o libsize_bar_s.so" "" @@ -444,7 +444,7 @@ if {![ld_compile "$cc_cmd $CFLAGS $picflag" $srcdir/$subdir/alias.c $tmpdir/alia || ![ld_compile "$cc_cmd $CFLAGS" $srcdir/$subdir/aliasmain.c $tmpdir/aliasmain.o] || ![ld_compile "$cc_cmd $CFLAGS" $srcdir/$subdir/weakref1.c $tmpdir/weakref1.o] || ![ld_compile "$cc_cmd $CFLAGS" $srcdir/$subdir/weakref2.c $tmpdir/weakref2.o]} then { - unresolved "ELF weak (alias)" + unsupported "ELF weak (alias)" } else { build_exec "ELF weak (alias)" alias "aliasmain.o weakref1.o weakref2.o alias.so" "-Wl,-rpath=.,--no-as-needed" alias "" "" } diff --git a/ld/testsuite/ld-ifunc/binutils.exp b/ld/testsuite/ld-ifunc/binutils.exp index 387696c..2543a4f 100644 --- a/ld/testsuite/ld-ifunc/binutils.exp +++ b/ld/testsuite/ld-ifunc/binutils.exp @@ -46,7 +46,7 @@ proc binutils_test { prog_name ld_options test } { set test_name "$prog_name $ld_options ($test)" if { ![ld_assemble $as $srcdir/$subdir/$test.s tmpdir/$test.o ] } { - unresolved "$test_name" + unsupported "$test_name" return } @@ -55,7 +55,7 @@ proc binutils_test { prog_name ld_options test } { || [string match "*unrecognized option*" $link_output] } { unsupported "$ld_options is not supported by this target" } else { - unresolved "$test_name" + fail "$test_name" } return } @@ -64,7 +64,7 @@ proc binutils_test { prog_name ld_options test } { set got [remote_exec host "$READELF -l --wide tmpdir/$test" "" "/dev/null" "tmpdir/$test.exp"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" return } @@ -80,7 +80,7 @@ proc binutils_test { prog_name ld_options test } { set got [remote_exec host "$READELF -l --wide tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" return } diff --git a/ld/testsuite/ld-mips-elf/mips-elf-flags.exp b/ld/testsuite/ld-mips-elf/mips-elf-flags.exp index 4d97f01..0a17919 100644 --- a/ld/testsuite/ld-mips-elf/mips-elf-flags.exp +++ b/ld/testsuite/ld-mips-elf/mips-elf-flags.exp @@ -115,7 +115,7 @@ proc good_combination {arglist flags args} { set cmdret [lindex $cmdret 0] if {$cmdret != 0 \ || ![regexp "Flags: *(\[^\n\r\]*)" $output full gotflags]} { - unresolved $testname + fail $testname } else { set failed 0 diff --git a/ld/testsuite/ld-misc/defsym.exp b/ld/testsuite/ld-misc/defsym.exp index bf60fe3..906f14e 100644 --- a/ld/testsuite/ld-misc/defsym.exp +++ b/ld/testsuite/ld-misc/defsym.exp @@ -20,17 +20,17 @@ # if ![ld_assemble $as $srcdir/$subdir/start.s tmpdir/start.o] { - unresolved "Build start.o" + unsupported "Build start.o" return } if ![ld_assemble $as $srcdir/$subdir/foo.s tmpdir/foo.o] { - unresolved "Build foo.o" + unsupported "Build foo.o" return } if { ![ar_simple_create $ar "" tmpdir/libfoo.a tmpdir/foo.o] } { - unresolved "Build libfoo.a" + fail "Build libfoo.a" return } diff --git a/ld/testsuite/ld-mn10300/mn10300.exp b/ld/testsuite/ld-mn10300/mn10300.exp index 151dfcd..7a44954 100644 --- a/ld/testsuite/ld-mn10300/mn10300.exp +++ b/ld/testsuite/ld-mn10300/mn10300.exp @@ -139,23 +139,23 @@ proc i126256-test { } { } if { ![ld_compile "$CC -mrelax -fPIC" $srcdir/$subdir/i126256-1.c $tmpdir/i126256-1.o] } { - unresolved $testname - return + unsupported $testname + return } if { ![ld_compile "$CC -mrelax -fPIC" $srcdir/$subdir/i126256-2.c $tmpdir/i126256-2.o] } { - unresolved $testname - return + unsupported $testname + return } if { ![ld_link $ld $tmpdir/i126256-1.so "-shared $tmpdir/i126256-1.o -e 0"]} { - unresolved $testname - return + fail $testname + return } if { ![ld_link $ld $tmpdir/i126256-2.so "--relax -shared $tmpdir/i126256-2.o $tmpdir/i126256-1.so -e 0"]} { - fail $testname - return + fail $testname + return } pass $testname diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index 33e5c19..38cea30 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -679,7 +679,7 @@ set testname "Build liblto-11.a" remote_file host delete "tmpdir/liblto-11.a" set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"] if {![string match "" $catch_output]} { - unresolved $testname + fail $testname restore_notify return } diff --git a/ld/testsuite/ld-plugin/plugin.exp b/ld/testsuite/ld-plugin/plugin.exp index 5825bc7..b8bf29e 100644 --- a/ld/testsuite/ld-plugin/plugin.exp +++ b/ld/testsuite/ld-plugin/plugin.exp @@ -25,11 +25,9 @@ if ![check_plugin_api_available] { # And a compiler to be available. set can_compile 1 -set failure_kind "unresolved" if { ![check_compiler_available] } { # Don't fail immediately, set can_compile 0 - set failure_kind "unsupported" } pass "plugin API enabled" @@ -286,11 +284,11 @@ set plugin_extra_elf_tests [list \ if { !$can_compile || $failed_compile } { foreach testitem $plugin_tests { - $failure_kind [lindex $testitem 0] + unsupported [lindex $testitem 0] } if { [is_elf_format] } { foreach testitem $plugin_extra_elf_tests { - $failure_kind [lindex $testitem 0] + unsupported [lindex $testitem 0] } } set CFLAGS "$old_CFLAGS" @@ -309,7 +307,7 @@ if { [is_elf_format] \ if {![ar_simple_create $ar "" "tmpdir/libtext.a" "tmpdir/text.o"] || \ ![ar_simple_create $ar "" "tmpdir/libempty.a" ""]} { foreach testitem $plugin_lib_tests { - unresolved [lindex $testitem 0] + unsupported [lindex $testitem 0] } } else { run_ld_link_tests $plugin_lib_tests @@ -373,7 +371,7 @@ if [ar_simple_create $ar "--plugin $plugin2_path" "tmpdir/libfunc.a" \ } } else { foreach testitem $plugin_src_tests { - unresolved [lindex $testitem 0] + unsupported [lindex $testitem 0] } } @@ -393,7 +391,7 @@ if [ar_simple_create $ar "--plugin $plugin4_path" "tmpdir/libpr20070.a" \ ] \ ] } else { - unresolved "PR ld/20070" + unsupported "PR ld/20070" } set CFLAGS "$old_CFLAGS" 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 diff --git a/ld/testsuite/ld-selective/selective.exp b/ld/testsuite/ld-selective/selective.exp index 0fa9eed..7b115ad 100644 --- a/ld/testsuite/ld-selective/selective.exp +++ b/ld/testsuite/ld-selective/selective.exp @@ -111,7 +111,7 @@ foreach testitem $seltests { # tests. It might have been a buglet originally; now I think better # leave as is. if { ![ld_compile "$compiler $testflags" $srcdir/$subdir/$testfile $objfile] } { - unresolved $testname + unsupported $testname continue } diff --git a/ld/testsuite/ld-sh/sh.exp b/ld/testsuite/ld-sh/sh.exp index 4ba35f2..78905f0 100644 --- a/ld/testsuite/ld-sh/sh.exp +++ b/ld/testsuite/ld-sh/sh.exp @@ -31,7 +31,7 @@ if ![istarget sh*-*-*] { set testsimple "SH simple relaxing" if { ![is_elf_format] } { - unresolved $testsimple + unsupported $testsimple } elseif { ![ld_assemble $as "-relax $srcdir/$subdir/sh1.s" tmpdir/sh1.o] } { fail $testsimple } elseif { ![ld_link $ld tmpdir/sh1 "-relax tmpdir/sh1.o"] } { @@ -56,7 +56,7 @@ if { ![is_elf_format] } { set testsrec "SH relaxing to S-records" if { ![remote_file host exists tmpdir/sh1] } { - unresolved $testsrec + unsupported $testsrec } else { if { [istarget sh*-linux-*] || [istarget sh-*-vxworks] } { # On these "non-embedded" targets, the default ELF and srec start @@ -79,7 +79,7 @@ if { ![remote_file host exists tmpdir/sh1] } { if ![string match "" $exec_output] { send_log "$exec_output\n" verbose "$exec_output" - unresolved $testsrec + fail $testsrec } else { send_log "$objcopy -O srec tmpdir/sh1 tmpdir/sh1.s1\n" verbose "$objcopy -O srec tmpdir/sh1 tmpdir/sh1.s1" @@ -87,7 +87,7 @@ if { ![remote_file host exists tmpdir/sh1] } { if ![string match "" $exec_output] { send_log "$exec_output\n" verbose "$exec_output" - unresolved $testsrec + fail $testsrec } else { send_log "cmp tmpdir/sh1.s1 tmpdir/sh1.s2\n" verbose "cmp tmpdir/sh1.s1 tmpdir/sh1.s2" @@ -107,7 +107,7 @@ if { ![remote_file host exists tmpdir/sh1] } { set testadjsw8 "SH switch8 adjustment after relax" if { ![is_elf_format] } { - unresolved $testadjsw8 + unsupported $testadjsw8 } elseif { ![ld_assemble $as "-relax $srcdir/$subdir/adjsw8.s" tmpdir/adjsw8.o] } { fail $testadjsw8 } elseif { ![ld_link $ld tmpdir/adjsw8 "-relax tmpdir/adjsw8.o"] } { @@ -145,16 +145,16 @@ if [istarget sh*-*linux*] { if {![ld_assemble $as "-relax tmpdir/start.s" tmpdir/start.o] \ || ![ld_compile $CC "-O -mrelax -foptimize-sibling-calls $srcdir/$subdir/sh2.c" tmpdir/sh2.o]} { - unresolved $testlink - unresolved $testjsr - unresolved $testrun + unsupported $testlink + unsupported $testjsr + unsupported $testrun return } if ![ld_link $ld tmpdir/sh2 "-relax tmpdir/start.o tmpdir/sh2.o"] { fail $testlink - unresolved $testjsr - unresolved $testrun + unsupported $testjsr + unsupported $testrun return } diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp index ffa6d24..0e45f5c 100644 --- a/ld/testsuite/ld-shared/shared.exp +++ b/ld/testsuite/ld-shared/shared.exp @@ -213,8 +213,8 @@ verbose "Using $picflag to compile PIC code" # Compile the main program. if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] { - unresolved "shared (non PIC)" - unresolved "shared" + unsupported "shared (non PIC)" + unsupported "shared" } else { # The shared library is composed of two files. First compile them # without using -fpic. That should work on an ELF system, @@ -225,7 +225,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] global PLT_CFLAGS NOPIE_CFLAGS if { ![ld_compile "$CC $PLT_CFLAGS $NOPIE_CFLAGS $CFLAGS $SHCFLAG" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o] || ![ld_compile "$CC $PLT_CFLAGS $CFLAGS $SHCFLAG" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } { - unresolved "shared (non PIC)" + unsupported "shared (non PIC)" } else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } { shared_test shnp "shared (nonPIC)" mainnp.o sh1np.o sh2np.o xcoff } else { @@ -286,7 +286,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] if { ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o] || ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } { - unresolved "shared" + unsupported "shared" } else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } { shared_test shp "shared" mainnp.o sh1p.o sh2p.o xcoff @@ -303,8 +303,8 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] # Now do the same tests again, but this time compile main.c PIC. if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] { - unresolved "shared (PIC main, non PIC so)" - unresolved "shared (PIC main)" + unsupported "shared (PIC main, non PIC so)" + unsupported "shared (PIC main)" } else { if { [file exists $tmpdir/sh1np.o ] && [ file exists $tmpdir/sh2np.o ] } { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } { @@ -333,7 +333,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/m shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared } } else { - unresolved "shared (PIC main, non PIC so)" + unsupported "shared (PIC main, non PIC so)" } if { [file exists $tmpdir/sh1p.o ] && [ file exists $tmpdir/sh2p.o ] } { @@ -343,7 +343,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/m shared_test shmpp "shared (PIC main)" mainp.o sh1p.o sh2p.o shared } } else { - unresolved "shared (PIC main)" + unsupported "shared (PIC main)" } } diff --git a/ld/testsuite/ld-srec/srec.exp b/ld/testsuite/ld-srec/srec.exp index c6c3fd0..e3e4b98 100644 --- a/ld/testsuite/ld-srec/srec.exp +++ b/ld/testsuite/ld-srec/srec.exp @@ -315,7 +315,7 @@ proc run_srec_test { test objs } { if ![string match "" $exec_output] { send_log "$exec_output\n" verbose "$exec_output" - unresolved $test + fail $test return } @@ -367,8 +367,8 @@ if { [is_elf_format] \ if { ![ld_compile $CC $srcdir/$subdir/sr1.c tmpdir/sr1.o] \ || ![ld_compile $CC $srcdir/$subdir/sr2.c tmpdir/sr2.o] } { - unresolved $test1 - unresolved $test2 + unsupported $test1 + unsupported $test2 set CC "$old_CC" set CXX "$old_CXX" set CXXFLAGS "$old_CXXFLAGS" @@ -450,7 +450,7 @@ if { ![is_remote host] && [which $CXX] == 0 } { } if ![ld_compile "$CXX $CXXFLAGS -fno-exceptions" $srcdir/$subdir/sr3.cc tmpdir/sr3.o] { - unresolved $test2 + unsupported $test2 set CC "$old_CC" set CXX "$old_CXX" set CXXFLAGS "$old_CXXFLAGS" diff --git a/ld/testsuite/ld-tic6x/tic6x.exp b/ld/testsuite/ld-tic6x/tic6x.exp index 0a913da..ddd0de7 100644 --- a/ld/testsuite/ld-tic6x/tic6x.exp +++ b/ld/testsuite/ld-tic6x/tic6x.exp @@ -175,7 +175,7 @@ proc check_osabi_tic6x { test_name binary_file } { if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" - unresolved "$test_name" + fail "$test_name" remote_file build delete "dump.out" return } @@ -184,7 +184,7 @@ proc check_osabi_tic6x { test_name binary_file } { if { ![regexp "\n\[ \]*OS/ABI:\[ \]*(.+)\n\[ \]*ABI" \ [file_contents dump.out] nil osabi] } { verbose "proc check_osabi_tic6x: Readelf failed to extract an ELF header from $binary_file" - unresolved "$test_name" + fail "$test_name" } elseif { $osabi == $expected_osabi } { pass "$test_name" } else { diff --git a/ld/testsuite/ld-undefined/undefined.exp b/ld/testsuite/ld-undefined/undefined.exp index 4480dfc..9e2b073 100644 --- a/ld/testsuite/ld-undefined/undefined.exp +++ b/ld/testsuite/ld-undefined/undefined.exp @@ -31,9 +31,9 @@ if { ![check_compiler_available] } { untested $testline } elseif { ![ld_compile "$CC -g $NOLTO_CFLAGS" $srcdir/$subdir/undefined.c tmpdir/undefined.o] } { verbose "Unable to compile test file!" 1 - unresolved $testund - unresolved $testfn - unresolved $testline + unsupported $testund + unsupported $testfn + unsupported $testline } else { remote_file host delete "tmpdir/undefined" @@ -177,58 +177,50 @@ if { ![is_elf_format] || ![check_shared_lib_support]} then { setup_xfail tic6x-*-* fail $testname } else { - if {![is_remote host] && [which $nm] == 0} then { - unresolved "$testname (dyn sym)" + set exec_output [run_host_cmd "$nm" "-D tmpdir/fundef.so"] + set exec_output [prune_warnings $exec_output] + + if { ($asflags == "" + || ([regexp ".* undef_fun_typed.*" $exec_output] + && [regexp ".* undef_fun_notype.*" $exec_output])) + && [regexp ".* undef_data.*" $exec_output] + && [regexp ".* undef_pfun.*" $exec_output] + && [regexp ".* undef_notype.*" $exec_output]} then { + pass "$testname (dyn sym)" } else { - set exec_output [run_host_cmd "$nm" "-D tmpdir/fundef.so"] - set exec_output [prune_warnings $exec_output] - - if { ($asflags == "" - || ([regexp ".* undef_fun_typed.*" $exec_output] - && [regexp ".* undef_fun_notype.*" $exec_output])) - && [regexp ".* undef_data.*" $exec_output] - && [regexp ".* undef_pfun.*" $exec_output] - && [regexp ".* undef_notype.*" $exec_output]} then { - pass "$testname (dyn sym)" - } else { - fail "$testname (dyn sym)" - } + fail "$testname (dyn sym)" } global READELF - if {![is_remote host] && [which $READELF] == 0} then { - unresolved "$testname (dyn reloc)" - } else { - set exec_output [run_host_cmd "$READELF" "-r tmpdir/fundef.so"] - set exec_output [prune_warnings $exec_output] - - # We ought to get two .rel{a}.plt and three .rel{a}.dyn relocs, - # except for MIPS targets whose psABI mandates an extra - # R_MIPS_NONE relocation, also used to pad n64 relocation - # triplets, and S+core targets using an extra R_SCORE_NONE - # relocation, so adjust for that. - switch -glob $target_triplet { - "mips64*-*-openbsd*" { - set none_count 6 - set reloc_count 4 - } - "mips*" - - "score*" { - set none_count 1 - set reloc_count 4 - } - "*" { - set none_count 0 - set reloc_count 3 - } + set exec_output [run_host_cmd "$READELF" "-r tmpdir/fundef.so"] + set exec_output [prune_warnings $exec_output] + + # We ought to get two .rel{a}.plt and three .rel{a}.dyn relocs, + # except for MIPS targets whose psABI mandates an extra + # R_MIPS_NONE relocation, also used to pad n64 relocation + # triplets, and S+core targets using an extra R_SCORE_NONE + # relocation, so adjust for that. + switch -glob $target_triplet { + "mips64*-*-openbsd*" { + set none_count 6 + set reloc_count 4 } - - if { ($asflags == "" || [regexp ".* contains 2 .*" $exec_output]) - && [regexp ".* contains $reloc_count .*" $exec_output] - && [regexp -all "_NONE" $exec_output] == $none_count } then { - pass "$testname (dyn reloc)" - } else { - fail "$testname (dyn reloc)" + "mips*" - + "score*" { + set none_count 1 + set reloc_count 4 + } + "*" { + set none_count 0 + set reloc_count 3 } } + + if { ($asflags == "" || [regexp ".* contains 2 .*" $exec_output]) + && [regexp ".* contains $reloc_count .*" $exec_output] + && [regexp -all "_NONE" $exec_output] == $none_count } then { + pass "$testname (dyn reloc)" + } else { + fail "$testname (dyn reloc)" + } } diff --git a/ld/testsuite/ld-undefined/weak-undef.exp b/ld/testsuite/ld-undefined/weak-undef.exp index a14140d..4f470e5 100644 --- a/ld/testsuite/ld-undefined/weak-undef.exp +++ b/ld/testsuite/ld-undefined/weak-undef.exp @@ -28,7 +28,7 @@ if { ![is_elf_format] && ![is_pecoff_format] } then { } elseif {![ld_assemble $as $srcdir/$subdir/weak-undef.s \ tmpdir/weak-undef.o]} then { # It's OK if .weak doesn't work on this target. - unresolved $testname + unsupported $testname } elseif {![ld_link $ld tmpdir/weak-undef \ "tmpdir/weak-undef.o -T $srcdir/$subdir/weak-undef.t"]} then { # Weak symbols are broken for non-i386 PE targets. @@ -36,8 +36,6 @@ if { ![is_elf_format] && ![is_pecoff_format] } then { setup_xfail *-*-pe* } fail $testname -} elseif {![is_remote host] && [which $objdump] == 0} then { - unresolved $testname } else { set exec_output [run_host_cmd "$objdump" "-s tmpdir/weak-undef"] set exec_output [prune_warnings $exec_output] @@ -59,8 +57,6 @@ proc undef_weak_so { testname opts passval } { if {![ld_link $ld tmpdir/weak-fundef.so \ "$opts tmpdir/weak-fundef.o"]} then { fail $testname - } elseif {![is_remote host] && [which $nm] == 0} then { - unresolved $testname } else { set exec_output [run_host_cmd "$nm" "-D tmpdir/weak-fundef.so"] set exec_output [prune_warnings $exec_output] @@ -83,8 +79,6 @@ proc undef_weak_exe { testname opts passval } { if {![ld_link $ld tmpdir/weak-fundef \ "$opts tmpdir/weak-fundef.o tmpdir/weak-fundef.so"]} then { fail $testname - } elseif {![is_remote host] && [which $nm] == 0} then { - unresolved $testname } else { set exec_output [run_host_cmd "$nm" "-D tmpdir/weak-fundef"] set exec_output [prune_warnings $exec_output] diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index 97b1ab3..4a08617 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -494,7 +494,7 @@ proc run_ld_link_tests { ldtests args } { set binfile tmpdir/[lindex $testitem 6] set cflags [lindex $testitem 7] set objfiles {} - set is_unresolved 0 + set is_unsupported 0 set failed 0 set maybe_failed 0 set ld_output "" @@ -523,7 +523,7 @@ proc run_ld_link_tests { ldtests args } { catch "$unbzip2" exec_output if ![string match "" $exec_output] then { send_log "$exec_output\n" - set is_unresolved 1 + set is_unsupported 1 break } } else { @@ -531,7 +531,7 @@ proc run_ld_link_tests { ldtests args } { if { [file extension $src_file] == ".c" } { set as_file "tmpdir/$fileroot.s" if ![ld_compile "$CC -S $CFLAGS $cflags" $srcdir/$subdir/$src_file $as_file] { - set is_unresolved 1 + set is_unsupported 1 break } } else { @@ -551,8 +551,8 @@ proc run_ld_link_tests { ldtests args } { continue } # Catch compiler errors. - if { $is_unresolved } { - unresolved $testname + if { $is_unsupported } { + unsupported $testname continue } @@ -567,6 +567,7 @@ proc run_ld_link_tests { ldtests args } { set ld_output "$exec_output" } + set is_unresolved 0 if { !$failed } { foreach actionlist $actions { set action [lindex $actionlist 0] @@ -751,7 +752,7 @@ proc run_ld_link_exec_tests { ldtests args } { } } if { $failed != 0 } { - unresolved $testname + unsupported $testname continue } @@ -941,7 +942,7 @@ proc run_cc_link_tests { ldtests } { } } if { $failed != 0 } { - unresolved $testname + unsupported $testname continue } |