+2021-02-12 Alan Modra <amodra@gmail.com>
+
+ * testsuite/binutils-all/objcopy.exp: Report "unsupported" when
+ gas or ld fails to build a testcase rather than "unresolved".
+ Report "fail" when readelf returns an error status rather than
+ "unresolved".
+ * testsuite/binutils-all/ar.exp: Likewise.
+ * testsuite/binutils-all/compress.exp: Likewise.
+ * testsuite/binutils-all/readelf.exp: Likewise.
+
2021-02-12 Alan Modra <amodra@gmail.com>
* testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and
set testname "ar symbol table"
if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] {
- unresolved $testname
+ unsupported $testname
return
}
set testname "ar thin archive"
if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] {
- unresolved $testname
+ unsupported $testname
return
}
set testname "ar thin archive with nested archive"
if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] {
- unresolved $testname
+ unsupported $testname
return
}
set testname "ar argument parsing"
if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] {
- unresolved $testname
+ unsupported $testname
return
}
set testname "ar deterministic archive"
if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] {
- unresolved $testname
+ unsupported $testname
return
}
set testname "ar unique symbol in archive"
if ![binutils_assemble $srcdir/$subdir/unique.s tmpdir/unique.${obj}] {
- unresolved $testname
+ unsupported $testname
return
}
set testname "ar deleting an element"
if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] {
- unresolved $testname
+ unsupported $testname
return
}
set testname "ar moving an element"
if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] {
- unresolved $testname
+ unsupported $testname
return
}
set testname "ar extracting an element"
if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] {
- unresolved $testname
+ unsupported $testname
return
}
set ofile "tmpdir/d-$i.${obj}"
if ![binutils_assemble $sfile $ofile] {
- unresolved $testname
+ unsupported $testname
return
}
set testname "ar adding library dependencies"
if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] {
- unresolved $testname
+ unsupported $testname
return
}
global OBJDUMP
if { ![binutils_assemble_flags $srcdir/$subdir/dw2-3.S ${testfile3}.o "$as_flags"] } then {
- unresolved "$testname"
+ unsupported "$testname"
return
}
}
if {![binutils_assemble_flags $srcdir/$subdir/${srcfile} $t_tempfile "$asflags"]} then {
- unresolved "objcopy $type ($testname)"
+ unsupported "objcopy $type ($testname)"
remote_file host delete $t_tempfile
return
}
set t_copyfile $copyfile
set got [binutils_run $LD "$tempfile -o $t_tempfile $ldflags"]
if { ![string equal "" $got] } then {
- unresolved "objcopy $type ($testname)"
+ unsupported "objcopy $type ($testname)"
return
}
set xflags "--preserve-dates"
set got [binutils_assemble $srcdir/$subdir/verilogtest.s $binfile]
if {![binutils_assemble $srcdir/$subdir/verilogtest.s $binfile]} then {
- unresolved "objcopy ($testname)"
+ unsupported "objcopy ($testname)"
return
}
verbose -log "$READELF -a tmpdir/testprog.o > tmpdir/osabi.in"
set exec_output [remote_exec host "$READELF -h tmpdir/testprog.o" "" "/dev/null" "tmpdir/osabi.in"]
if { [lindex $exec_output 0] != 0 } then {
- unresolved "$test preserving OS/ABI"
+ fail "$test preserving OS/ABI"
set osabi_fail "true"
} else {
verbose -log "grep OS/ABI tmpdir/osabi.in"
verbose -log "$READELF -a tmpdir/testprog.o > tmpdir/osabi.out"
set exec_output [remote_exec host "$READELF -h tmpdir/testprog.o" "" "/dev/null" "tmpdir/osabi.out"]
if { [lindex $exec_output 0] != 0 } then {
- unresolved "$test preserving OS/ABI"
+ fail "$test preserving OS/ABI"
} else {
verbose -log "grep OS/ABI tmpdir/osabi.out"
catch "exec grep OS/ABI tmpdir/osabi.out" osabi_out
verbose -log "$READELF -a ${copyfile} > tmpdir/osabi.in"
set exec_output [remote_exec host "$READELF -h ${copyfile}" "" "/dev/null" "tmpdir/osabi.in"]
if { [lindex $exec_output 0] != 0 } then {
- unresolved "$test1 preserving OS/ABI"
+ fail "$test1 preserving OS/ABI"
set osabi_fail "true"
} else {
verbose -log "grep OS/ABI tmpdir/osabi.in"
verbose -log "$READELF -a ${copyfile} > tmpdir/osabi.out"
set exec_output [remote_exec host "$READELF -h ${copyfile}" "" "/dev/null" "tmpdir/osabi.out"]
if { [lindex $exec_output 0] != 0 } then {
- unresolved "$test1 preserving OS/ABI"
+ fail "$test1 preserving OS/ABI"
} else {
verbose -log "grep OS/ABI tmpdir/osabi.out"
catch "exec grep OS/ABI tmpdir/osabi.out" osabi_out
global subdir
if {![binutils_assemble $srcdir/$subdir/${srcfile} tmpdir/bintest.o]} then {
- unresolved "objcopy ($testname)"
+ unsupported "objcopy ($testname)"
return
}
verbose -log "$READELF -a tmpdir/bintest.o > tmpdir/bintest.o.out"
set exec_output [remote_exec host "$READELF -a tmpdir/bintest.o" "" "/dev/null" "tmpdir/bintest.o.out"]
if { [lindex $exec_output 0] != 0 } then {
- unresolved "objcopy ($testname)"
+ fail "objcopy ($testname)"
return
}
set exec_output [prune_warnings [lindex $exec_output 1]]
verbose -log "$READELF -a tmpdir/copy.o > tmpdir/copy.o.out"
set exec_output [remote_exec host "$READELF -a tmpdir/copy.o" "" "/dev/null" "tmpdir/copy.o.out"]
if { [lindex $exec_output 0] != 0 } then {
- unresolved "objcopy ($testname)"
+ fail "objcopy ($testname)"
return
}
set exec_output [prune_warnings [lindex $exec_output 1]]
set srcfile $srcdir/$subdir/needed-by-reloc.s
if {![binutils_assemble $srcfile tmpdir/bintest.o]} then {
- unresolved $test
+ unsupported $test
} else {
set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS --strip-symbol=foo tmpdir/bintest.o ${copyfile}.o"]
# Assemble the dump test file.
if {![binutils_assemble $srcdir/$subdir/dumptest.s tmpdir/dumptest.o]} then {
- unresolved "readelf -p: failed to assemble dump test file"
+ unsupported "readelf -p: failed to assemble dump test file"
return
}
# Download it.
# Assemble the test file.
if {![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then {
- unresolved "readelf -h bintest (failed to assemble)"
- unresolved "readelf -S bintest (failed to assemble)"
- unresolved "readelf -s bintest (failed to assemble)"
- unresolved "readelf -r bintest (failed to assemble)"
+ unsupported "readelf -h bintest (failed to assemble)"
+ unsupported "readelf -S bintest (failed to assemble)"
+ unsupported "readelf -s bintest (failed to assemble)"
+ unsupported "readelf -r bintest (failed to assemble)"
global readelf_size
set readelf_size ""
} else {
# Test demangling symbol names.
if {![binutils_assemble $srcdir/$subdir/mangled.s tmpdir/mangled.o]} then {
- unresolved "readelf -s -C bintest (failed to assemble)"
+ unsupported "readelf -s -C bintest (failed to assemble)"
} else {
if ![is_remote host] {
# PR 13482 - Check for off-by-one errors when dumping .note sections.
if {![binutils_assemble $srcdir/$subdir/version.s tmpdir/version.o]} then {
- unresolved "readelf -n version (failed to assemble)"
+ unsupported "readelf -n version (failed to assemble)"
} else {
if ![is_remote host] {
# PR 18374 - Check that relocations against the .debug_loc section
# do not prevent readelf from displaying all the location lists.
if {![binutils_assemble $srcdir/$subdir/pr18374.s tmpdir/pr18374.o]} then {
- unresolved "readelf --debug-dump=loc pr18374 (failed to assemble)"
+ unsupported "readelf --debug-dump=loc pr18374 (failed to assemble)"
} else {
if ![is_remote host] {
# locview - Check dumping of location lists with location views.
if {![binutils_assemble $srcdir/$subdir/locview-1.s tmpdir/locview-1.o]} then {
- unresolved "readelf --debug-dump=loc locview-1 (failed to assemble)"
+ unsupported "readelf --debug-dump=loc locview-1 (failed to assemble)"
} else {
if ![is_remote host] {
readelf_test --debug-dump=loc $tempfile readelf.locview-1 {}
}
if {![binutils_assemble $srcdir/$subdir/locview-2.s tmpdir/locview-2.o]} then {
- unresolved "readelf --debug-dump=loc locview-2 (failed to assemble)"
+ unsupported "readelf --debug-dump=loc locview-2 (failed to assemble)"
} else {
if ![is_remote host] {
# Check that decompressed dumps work.
if {![binutils_assemble $srcdir/$subdir/z.s tmpdir/z.o]} then {
- unresolved "readelf --decompress --hex-dump .debug_loc z (failed to assemble)"
+ unsupported "readelf --decompress --hex-dump .debug_loc z (failed to assemble)"
} else {
if ![is_remote host] {
# Assemble the DWARF-5 test file.
if {![binutils_assemble_flags $srcdir/$subdir/dw5.S tmpdir/dw5.o $hpux]} then {
- unresolved "readelf -wiaoRlL dw5 (failed to assemble)"
+ unsupported "readelf -wiaoRlL dw5 (failed to assemble)"
} else {
# Download it.
# Assemble the DWARF-5 attributes test file.
if {![binutils_assemble_flags $srcdir/$subdir/dwarf-attributes.S tmpdir/dwarf-attributes.o ""]} then {
- unresolved "readelf -wi dwarf-attributes (failed to assemble)"
+ unsupported "readelf -wi dwarf-attributes (failed to assemble)"
} else {
# Download it.
if ![is_remote host] {
# Check that debug link sections can be dumped.
if {![binutils_assemble $srcdir/$subdir/debuglink.s tmpdir/debuglink.o]} then {
- unresolved "readelf --debug-dump=links (failed to assemble debuglink.s)"
+ unsupported "readelf --debug-dump=links (failed to assemble debuglink.s)"
} else {
if ![is_remote host] {
set tempfile tmpdir/debuglink.o
# Check that debug link sections can be followed.
if {![binutils_assemble $srcdir/$subdir/linkdebug.s tmpdir/linkdebug.debug]} then {
- unresolved "readelf --debug-dump=follow-links (failed to assemble linkdebug.s)"
+ unsupported "readelf --debug-dump=follow-links (failed to assemble linkdebug.s)"
} else {
if [is_remote host] {
set tempfile2 [remote_download host tmpdir/linkdebug.debug]
}
if {![binutils_assemble $srcdir/$subdir/dwo.s tmpdir/dwo.o]} then {
- unresolved "readelf --debug-dump=links (failed to assemble dwo.s)"
+ unsupported "readelf --debug-dump=links (failed to assemble dwo.s)"
} else {
if ![is_remote host] {
set tempfile tmpdir/dwo.o
}
if {![binutils_assemble $srcdir/$subdir/zero-sec.s tmpdir/zero-sec.o]} then {
- unresolved "readelf --enable-checks (failed to assemble zero-sec.s)"
+ unsupported "readelf --enable-checks (failed to assemble zero-sec.s)"
} else {
if ![is_remote host] {
set tempfile tmpdir/zero-sec.o