This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Fixing ld-elf/frame.exp tests
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Mon, 21 Jun 2004 11:23:46 +0100
- Subject: Fixing ld-elf/frame.exp tests
Hi Guys,
I am applying the patch below to fix some bogus unexpected failures
in the linker testsuite. The problem with the ld-elf/frame.exp
test is that it assumes that all ELF based ports support the
--shared linker switch. This is not true however, so I have added
some code to catch the error message from the linker and to return a
result of UNSUPPORTED rather than FAIL.
This affects the arc-elf, avr-elf, cris-elf, d10v-elf, dlx-elf,
fr30-elf, frv-elf, h8300-elf ip2k-elf, iq2000-elf, m32r-elf,
msp430-elf, openrisc-elf, or32-elf and xstormy16-elf ports.
Cheers
Nick
ld/testsuite/ChangeLog
2004-06-21 Nick Clifton <nickc@redhat.com>
* ld-elf/frame.exp: Handle ports which do not support the --shared
linker switch.
Index: ld/testsuite/ld-elf/frame.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/frame.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 frame.exp
*** ld/testsuite/ld-elf/frame.exp 17 May 2004 17:38:46 -0000 1.1
--- ld/testsuite/ld-elf/frame.exp 21 Jun 2004 10:19:17 -0000
*************** if { ![ld_assemble $as $srcdir/$subdir/t
*** 40,46 ****
if { [ld_simple_link $ld tmpdir/frame.so "--shared tmpdir/frame.o tmpdir/tbss.o"] } {
pass "$test1"
} else {
! fail "$test1"
}
if ![ld_assemble $as $srcdir/$subdir/table.s tmpdir/table.o ] {
--- 40,50 ----
if { [ld_simple_link $ld tmpdir/frame.so "--shared tmpdir/frame.o tmpdir/tbss.o"] } {
pass "$test1"
} else {
! if [string match "*shared not supported*" $link_output] {
! unsupported "-shared is not supported by this target"
! } else {
! fail "$test1"
! }
}
if ![ld_assemble $as $srcdir/$subdir/table.s tmpdir/table.o ] {
*************** if ![ld_assemble $as $srcdir/$subdir/tab
*** 51,55 ****
if { [ld_simple_link $ld tmpdir/table.so "--shared tmpdir/table.o tmpdir/tbss.o"] } {
pass "$test2"
} else {
! fail "$test2"
}
--- 55,63 ----
if { [ld_simple_link $ld tmpdir/table.so "--shared tmpdir/table.o tmpdir/tbss.o"] } {
pass "$test2"
} else {
! if [string match "*shared not supported*" $link_output] {
! unsupported "-shared is not supported by this target"
! } else {
! fail "$test2"
! }
}