public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Fix testsuite XPASSes
@ 2011-05-13  4:14 Alan Modra
  2011-05-14  0:52 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2011-05-13  4:14 UTC (permalink / raw)
  To: binutils

This cures some XPASSes.  In the case of the gas redef2 and redef3
tests, certain targets will now FAIL that silently XFAILed before.  If
my analysis is correct these new FAILs are real failures: performing a
final link on the object file resulted in a binary with wrong
addresses.

binutils/testsuite/
	* binutils-all/objcopy.exp objcopy_text): Remove xfails for sh-rtems
	and tic4x.
gas/testsuite/
	* gas/all/gas.exp: Remove some xfails on redef2 and redef3 tests.
	Update comments.
	* gas/hppa/unsorted/unsorted.exp: Run globalbug test on appropriate
	targets rather than xfailing.
ld/testsuite/
	* ld-elf/flags1.d: Don't xfail tic6x.
	* ld-scripts/weak.exp: Correct comments.  Don't xfail sh-pe.  Remove
	redundant xfail.
	* ld-selective/sel-dump.exp: Don't xfail alpha.
	* ld-selective/selective.exp: Run for alpha.
	* ld-undefined/weak-undef.exp: Don't xfail hppa64.

Index: binutils/testsuite/binutils-all/objcopy.exp
===================================================================
RCS file: /cvs/src/src/binutils/testsuite/binutils-all/objcopy.exp,v
retrieving revision 1.72
diff -u -p -r1.72 objcopy.exp
--- binutils/testsuite/binutils-all/objcopy.exp	6 Apr 2011 17:09:50 -0000	1.72
+++ binutils/testsuite/binutils-all/objcopy.exp	13 May 2011 02:30:43 -0000
@@ -87,8 +87,8 @@ proc objcopy_test {testname srcfile} {
 	setup_xfail "m68*-*-sysv*" "m68*-apple-aux*"
 	setup_xfail "m8*-*"
 	setup_xfail "or32-*-rtems*" "or32-*-coff"
-	setup_xfail "sh-*-coff*" "sh-*-rtems*" 
-	setup_xfail "tic4x-*-*" "tic80-*-*" "w65-*"
+	setup_xfail "sh-*-coff*"
+	setup_xfail "tic80-*-*" "w65-*"
 
 	clear_xfail "hppa*64*-*-hpux*" "hppa*-*-linux*" "hppa*-*-lites*"
 	clear_xfail "hppa*-*-*n*bsd*" "hppa*-*-rtems*" "*-*-*elf*"
Index: gas/testsuite/gas/all/gas.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/all/gas.exp,v
retrieving revision 1.72
diff -u -p -r1.72 gas.exp
--- gas/testsuite/gas/all/gas.exp	18 Apr 2011 13:43:20 -0000	1.72
+++ gas/testsuite/gas/all/gas.exp	13 May 2011 02:30:49 -0000
@@ -130,20 +130,22 @@ case $target_triplet in {
     { z80-*-* } { }
     default {
 	run_dump_test redef
-	# The next two tests can fail if the target does not convert fixups
-	# against ordinary symbols into relocations against section symbols.
-	# This is usually revealed by the error message:
-	#  symbol `sym' required but not present
-	setup_xfail "*arm*-*-*aout*" "*arm*-*-*coff" \
-	    "*arm*-*-pe" "m68hc*-*-*" \
-	    "rx-*-*" "vax*-*-*" "z8k-*-*"
+	# These targets fail redef2 because they disallow redefined
+	# symbols on relocs.
+	setup_xfail "m68hc*-*-*" "rx-*-*" "vax*-*-*" "z8k-*-*"
 	run_dump_test redef2
-	setup_xfail "*-*-aix*" "bfin-*-*" "hppa*-*-hpux*" \
-	    "i\[3-7\]86-*-*coff" "i\[3-7\]86-*-*pe" "i\[3-7\]86-*-go32*" \
-	    "i\[3-7\]86-*-cygwin*" "i\[3-7\]86-*-mingw*" \
-	    "x86_64-*-*coff" "x86_64-*-*pe" \
-	    "x86_64-*-cygwin*" "x86_64-*-mingw*" \
-	    "m68hc*-*-*" "or32-*-*" "rx-*-*" "vax*-*-*" "z8k-*-*"
+	setup_xfail "m68hc*-*-*" "rx-*-*" "vax*-*-*" "z8k-*-*"
+	# rs6000-aix disallows redefinition via .comm.
+	setup_xfail "*-*-aix*"
+	# SOM uses a different syntax for .comm
+	setup_xfail "hppa*-*-hpux*"
+	# These targets fail redef3 because section contents for the
+	# word referencing the .comm sym is not zero and/or its reloc
+	# has a non-zero addend.  Relaxing the test would hide real
+	# failures such as or32-elf.
+	setup_xfail "bfin-*-*" "i\[3-7\]86-*-*coff" \
+	    "i\[3-7\]86-*-*pe" "i\[3-7\]86-*-go32*" \
+	    "i\[3-7\]86-*-cygwin*" "i\[3-7\]86-*-mingw*" "86_64-*-mingw*"
 	run_dump_test redef3
 	gas_test_error "redef4.s" "" ".set for symbol already used as label"
 	gas_test_error "redef5.s" "" ".set for symbol already defined through .comm"
Index: gas/testsuite/gas/hppa/unsorted/unsorted.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/hppa/unsorted/unsorted.exp,v
retrieving revision 1.12
diff -u -p -r1.12 unsorted.exp
--- gas/testsuite/gas/hppa/unsorted/unsorted.exp	2 Sep 2009 07:24:24 -0000	1.12
+++ gas/testsuite/gas/hppa/unsorted/unsorted.exp	13 May 2011 02:30:50 -0000
@@ -245,11 +245,13 @@ if [istarget hppa*-*-*] then {
     # Test bug where switching between subspaces creates bogus alignments
     do_align4_test
 
-    # Test a problem where $global$ is defined, then used within the
-    # same source file.
-    setup_xfail hppa*-*-*
-    gas_test "globalbug.s" "" "" "Use \$global\$ in file which defines it"
-
+    if { ([istarget *-*-osf*] || [istarget *-*-hpux*] || [istarget *-*-bsd*]
+	  || [istarget *-*-mpeix*] || [istarget *-*-hiux*])
+	 && ![istarget hppa*64*-*-hpux11*] } {
+	# Test a problem where $global$ is defined, then used within the
+	# same source file.
+	gas_test "globalbug.s" "" "" "Use \$global\$ in file which defines it"
+    }
     # Test that importing a defined symbol doesn't screw up the symbol's
     # space/subspace.
     do_import_test
Index: ld/testsuite/ld-elf/flags1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/flags1.d,v
retrieving revision 1.7
diff -u -p -r1.7 flags1.d
--- ld/testsuite/ld-elf/flags1.d	28 Oct 2010 06:21:49 -0000	1.7
+++ ld/testsuite/ld-elf/flags1.d	13 May 2011 02:31:07 -0000
@@ -3,10 +3,10 @@
 #objcopy_linked_file: --set-section-flags .post_text_reserve=contents,alloc,load,readonly,code 
 #readelf: -l --wide
 #xfail: "avr-*-*" "dlx-*-*" "h8300-*-*" "i960-*-*" "ip2k-*-*" "m32r-*-*"
-#xfail: "moxie-*-*" "mt-*-*" "msp430-*-*" "tic6x-*-*"
+#xfail: "moxie-*-*" "mt-*-*" "msp430-*-*"
 #xfail: "*-*-hpux*" "hppa*64*-*-*"
-# Fails on the AVR, DLX, H8300, I960, IP2K, M32R, MOXIE, MT, MSP430 and
-#  TI C6X because the two sections are not merged into one segment.
+# Fails on the AVR, DLX, H8300, I960, IP2K, M32R, MOXIE, MT, and MSP430
+#  because the two sections are not merged into one segment.
 #  (There is no good reason why they have to be).
 # Fails on HPUX systems because the .type pseudo-op behaves differently.
 # Fails on hppa64 because a PHDR is always added.
Index: ld/testsuite/ld-scripts/weak.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/weak.exp,v
retrieving revision 1.16
diff -u -p -r1.16 weak.exp
--- ld/testsuite/ld-scripts/weak.exp	2 Sep 2009 07:25:41 -0000	1.16
+++ ld/testsuite/ld-scripts/weak.exp	13 May 2011 02:31:08 -0000
@@ -22,17 +22,16 @@
 
 set testname "weak symbols"
 
-# This test only works for ELF targets.
+# This test only works for ELF targets and some PE targets.
 # It ought to work for some a.out targets, but it doesn't.
 if {! [is_elf_format] && ! [is_pecoff_format]} {
     unsupported $testname
     return
 }
 
-# Weak symbols are broken for non-i386 PE targets.
-if {! [istarget i?86-*-*]} {
+# Weak symbols are broken for most PE targets.
+if {! [istarget i?86-*-*] && ! [istarget sh-*-*]} {
     setup_xfail *-*-pe*
-    setup_xfail x86_64-*-pe*
 }
 
 # hppa64 and or32 are incredibly broken
Index: ld/testsuite/ld-selective/sel-dump.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-selective/sel-dump.exp,v
retrieving revision 1.11
diff -u -p -r1.11 sel-dump.exp
--- ld/testsuite/ld-selective/sel-dump.exp	2 Sep 2009 07:25:41 -0000	1.11
+++ ld/testsuite/ld-selective/sel-dump.exp	13 May 2011 02:31:08 -0000
@@ -28,7 +28,7 @@ set test_list [lsort [glob -nocomplain $
 for { set i 0 } { $i < [llength $test_list] } { incr i } {
     # We need to strip the ".d", but can leave the dirname.
     verbose [file rootname [lindex $test_list $i]]
-    setup_xfail "alpha*-*" "am33*-*" "arc*-*" "d30v*-*" "dlx*-*"
+    setup_xfail "am33*-*" "arc*-*" "d30v*-*" "dlx*-*"
     setup_xfail "hppa*64-*-*" "i370*-*" "i860*-*" "i960*-*" "ia64*-*"
     setup_xfail "m88*-*" "mn10200-*" "mep-*" "or32-*" "pj-*"
     run_dump_test [file rootname [lindex $test_list $i]]
Index: ld/testsuite/ld-selective/selective.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-selective/selective.exp,v
retrieving revision 1.44
diff -u -p -r1.44 selective.exp
--- ld/testsuite/ld-selective/selective.exp	6 Apr 2011 17:09:56 -0000	1.44
+++ ld/testsuite/ld-selective/selective.exp	13 May 2011 02:31:08 -0000
@@ -28,7 +28,7 @@ if ![is_elf_format] {
 }
 
 # These targets do not support selective linking
-if {[istarget "alpha*-*-*"] || [istarget "am33*-*-*"] ||
+if {[istarget "am33*-*-*"] ||
     [istarget "arc-*-*"] || [istarget "d30v-*-*"] ||
     [istarget "dlx-*-*"] || [istarget "hppa*64*-*-*"] ||
     [istarget "i370-*-*"] || [istarget "i860-*-*"] ||
Index: ld/testsuite/ld-undefined/weak-undef.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-undefined/weak-undef.exp,v
retrieving revision 1.11
diff -u -p -r1.11 weak-undef.exp
--- ld/testsuite/ld-undefined/weak-undef.exp	8 Nov 2010 06:43:40 -0000	1.11
+++ ld/testsuite/ld-undefined/weak-undef.exp	13 May 2011 02:31:08 -0000
@@ -50,7 +50,7 @@ if {! [istarget i?86-*-*]} {
     setup_xfail *-*-pe*
 }
 
-setup_xfail hppa64-*-* pj-*-*
+setup_xfail pj-*-*
 
 if {! [ld_assemble $as $srcdir/$subdir/weak-undef.s tmpdir/weak-undef.o]} then {
     # It's OK if .weak doesn't work on this target.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fix testsuite XPASSes
  2011-05-13  4:14 Fix testsuite XPASSes Alan Modra
@ 2011-05-14  0:52 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2011-05-14  0:52 UTC (permalink / raw)
  To: binutils

On Fri, May 13, 2011 at 01:44:20PM +0930, Alan Modra wrote:
> This cures some XPASSes.  In the case of the gas redef2 and redef3
> tests, certain targets will now FAIL that silently XFAILed before.  If
> my analysis is correct these new FAILs are real failures: performing a
> final link on the object file resulted in a binary with wrong
> addresses.

Oops, didn't mean to make x64_64-mingw fail.

	* gas/all/gas.exp: Fix typo last change.

Index: gas/testsuite/gas/all/gas.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/all/gas.exp,v
retrieving revision 1.73
diff -u -p -r1.73 gas.exp
--- gas/testsuite/gas/all/gas.exp	13 May 2011 04:16:22 -0000	1.73
+++ gas/testsuite/gas/all/gas.exp	13 May 2011 16:12:25 -0000
@@ -145,7 +145,7 @@ case $target_triplet in {
 	# failures such as or32-elf.
 	setup_xfail "bfin-*-*" "i\[3-7\]86-*-*coff" \
 	    "i\[3-7\]86-*-*pe" "i\[3-7\]86-*-go32*" \
-	    "i\[3-7\]86-*-cygwin*" "i\[3-7\]86-*-mingw*" "86_64-*-mingw*"
+	    "i\[3-7\]86-*-cygwin*" "i\[3-7\]86-*-mingw*" "x86_64-*-mingw*"
 	run_dump_test redef3
 	gas_test_error "redef4.s" "" ".set for symbol already used as label"
 	gas_test_error "redef5.s" "" ".set for symbol already defined through .comm"

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-14  0:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-13  4:14 Fix testsuite XPASSes Alan Modra
2011-05-14  0:52 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).