binutils-gdb/ld/testsuite
Alan Modra 348fe36b1d 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.
2020-06-20 15:53:37 +09:30
..
config Emit a warning when -z relro is unsupported 2020-06-19 09:50:20 +09:30
ld-aarch64
ld-alpha ecoff testsuite fixes 2020-06-20 10:59:11 +09:30
ld-arc
ld-arm
ld-auto-import
ld-avr
ld-bootstrap
ld-bpf
ld-cdtest
ld-checks
ld-cris
ld-crx
ld-csky
ld-cygwin
ld-d10v
ld-discard Unnecessary load_lib in ld testsuite 2020-06-15 15:07:13 +09:30
ld-dynamic
ld-elf Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-elfcomm
ld-elfvers ld testsuite fixes for alpha 2020-06-19 10:01:09 +09:30
ld-elfvsb Use __asm__ rather than asm in ld testsuite 2020-06-16 22:13:20 +09:30
ld-elfweak Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-fastcall Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-frv
ld-gc Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-h8300
ld-i386 Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-ia64 Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-ifunc ld testsuite fixes for alpha 2020-06-19 10:01:09 +09:30
ld-libs
ld-linkonce PR26103 testcase 2020-06-15 12:11:27 +09:30
ld-m68hc11
ld-m68k
ld-mep Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-metag
ld-mips-elf Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-misc
ld-mmix
ld-mn10300
ld-msp430-elf
ld-nds32
ld-nios2 Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-or1k
ld-pdp11
ld-pe Use __asm__ rather than asm in ld testsuite 2020-06-16 22:13:20 +09:30
ld-pie
ld-plugin Re: ld testsuite fixes for alpha 2020-06-19 12:59:30 +09:30
ld-powerpc
ld-pru
ld-riscv-elf
ld-s12z
ld-s390
ld-scripts Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-selective Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-sh SH gas configure and ld tests 2020-06-20 10:56:39 +09:30
ld-shared
ld-size Use __asm__ rather than asm in ld testsuite 2020-06-16 22:13:20 +09:30
ld-sparc
ld-spu
ld-srec
ld-tic6x Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-tilegx
ld-tilepro
ld-undefined
ld-unique
ld-v850
ld-vax-elf
ld-visium
ld-vxworks
ld-x86-64 Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-xc16x
ld-xstormy16
ld-xtensa
ld-z8k
ld-z80
lib Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-9303