aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-gc/gc.exp
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-06-20 15:53:37 +0930
committerAlan Modra <amodra@gmail.com>2020-06-20 15:53:37 +0930
commit348fe36b1d64f12c60e08f6313520b3191663063 (patch)
tree0ba7dba17349d8877b3c73e1685405e8933f660a /ld/testsuite/ld-gc/gc.exp
parentb0ee49d21ba0c4b7f9817db01dc247255eebd516 (diff)
downloadgdb-348fe36b1d64f12c60e08f6313520b3191663063.zip
gdb-348fe36b1d64f12c60e08f6313520b3191663063.tar.gz
gdb-348fe36b1d64f12c60e08f6313520b3191663063.tar.bz2
Remove perror from ld_assemble, ld_compile and ld_nm
ERROR should really be reserved for errors in the testsuite framework, not just normal errors from the tools under test. Removing use of perror has been suggested before but without action, over concerns that some test failures might be missed. This patch removes uses of perror in ld_assemble, ld_compile and ld_nm, and updates numerous places that ignored the result of these functions by inappropriately returning an "unresolved" test status. Net result over my large set of targets look good, in some cases improving the diagnostics, eg: i386-msdos -ERROR: tmpdir/script: nm failed i386-msdos -ERROR: tmpdir/script: nm failed i386-msdos -ERROR: tmpdir/script: nm failed i386-msdos -ERROR: tmpdir/script: nm failed i386-msdos +FAIL: script i386-msdos +FAIL: MRI script i386-msdos +FAIL: MEMORY i386-msdos +FAIL: MEMORY with symbols * testsuite/lib/ld-lib.exp (default_ld_compile): Don't perror on a compiler error. (default_ld_assemble): Similarly for an assembler error. (default_ld_nm): Similarly for an nm error. (run_ld_link_tests): Report ld_assemble errors as a fail. (check_as_cfi): Remove now unnecessary perror substitution. * testsuite/ld-elf/exclude.exp: Report ld_nm error return as test fails rather then unresolved. * testsuite/ld-gc/gc.exp: Likewise. * testsuite/ld-scripts/alignof.exp: Likewise. * testsuite/ld-scripts/defined.exp: Likewise. * testsuite/ld-scripts/script.exp: Likewise. * testsuite/ld-scripts/sizeof.exp: Likewise. * testsuite/ld-selective/selective.exp: Likewise. * testsuite/ld-scripts/extern.exp: Likewise. Return on ld_link failure. * testsuite/ld-elfweak/elfweak.exp: Report compiler errors as test unresolved. * testsuite/ld-fastcall/fastcall.exp: Report assember errors as test fails. * testsuite/ld-i386/i386.exp (iamcu_tests): Likewise. * testsuite/ld-ia64/line.exp: Likewise. * testsuite/ld-mep/mep.exp: Likewise. * testsuite/ld-mips-elf/mips-elf-flags.exp: Likewise. * testsuite/ld-nios2/nios2.exp: Likewise. * testsuite/ld-scripts/alignof.exp: Likewise. * testsuite/ld-x86-64/line.exp: Likewise. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-scripts/log2.exp: Formatting. * testsuite/ld-tic6x/tic6x.exp: Report ld_link errors as a test fail.
Diffstat (limited to 'ld/testsuite/ld-gc/gc.exp')
-rw-r--r--ld/testsuite/ld-gc/gc.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp
index 97ccf6a..ea33168 100644
--- a/ld/testsuite/ld-gc/gc.exp
+++ b/ld/testsuite/ld-gc/gc.exp
@@ -61,7 +61,7 @@ proc test_gc { testname filename linker ldflags} {
return
}
if ![ld_nm $nm "" $outfile] {
- unresolved $testname
+ fail $testname
return
}
if {![info exists nm_output(used_func)] \