csky ld testsuite fixes

Message ID 20190318121148.GQ20126@bubble.grove.modra.org
State New
Headers show
Series
  • csky ld testsuite fixes
Related show

Commit Message

Alan Modra March 18, 2019, 12:11 p.m.
Removes some XPASSes for CSKY (and a FAIL for moxie).

	* testsuite/ld-elf/merge.d: Remove csky from xfails, add moxie.
	* testsuite/ld-elf/pr21884.d: Remove csky from xfails.
	* testsuite/ld-elf/shared.exp: Add csky to list not xfailing pr22374.
	* testsuite/ld-unique/pr21529.d: Remove csky from xfails


-- 
Alan Modra
Australia Development Lab, IBM

Comments

H.J. Lu April 8, 2019, 9:24 p.m. | #1
On Mon, Mar 18, 2019 at 5:12 AM Alan Modra <amodra@gmail.com> wrote:
>

> Removes some XPASSes for CSKY (and a FAIL for moxie).

>

>         * testsuite/ld-elf/merge.d: Remove csky from xfails, add moxie.

>         * testsuite/ld-elf/pr21884.d: Remove csky from xfails.

>         * testsuite/ld-elf/shared.exp: Add csky to list not xfailing pr22374.

>         * testsuite/ld-unique/pr21529.d: Remove csky from xfails

>


csky-elf linker segfaults on these tests.

-- 
H.J.
Alan Modra April 9, 2019, 10:21 a.m. | #2
On Mon, Apr 08, 2019 at 02:24:12PM -0700, H.J. Lu wrote:
> On Mon, Mar 18, 2019 at 5:12 AM Alan Modra <amodra@gmail.com> wrote:

> >

> > Removes some XPASSes for CSKY (and a FAIL for moxie).

> >

> >         * testsuite/ld-elf/merge.d: Remove csky from xfails, add moxie.

> >         * testsuite/ld-elf/pr21884.d: Remove csky from xfails.

> >         * testsuite/ld-elf/shared.exp: Add csky to list not xfailing pr22374.

> >         * testsuite/ld-unique/pr21529.d: Remove csky from xfails

> >

> 

> csky-elf linker segfaults on these tests.


Not for me on numerous builds since I made those changes.

-- 
Alan Modra
Australia Development Lab, IBM
H.J. Lu April 9, 2019, 12:50 p.m. | #3
On Tue, Apr 9, 2019 at 3:22 AM Alan Modra <amodra@gmail.com> wrote:
>

> On Mon, Apr 08, 2019 at 02:24:12PM -0700, H.J. Lu wrote:

> > On Mon, Mar 18, 2019 at 5:12 AM Alan Modra <amodra@gmail.com> wrote:

> > >

> > > Removes some XPASSes for CSKY (and a FAIL for moxie).

> > >

> > >         * testsuite/ld-elf/merge.d: Remove csky from xfails, add moxie.

> > >         * testsuite/ld-elf/pr21884.d: Remove csky from xfails.

> > >         * testsuite/ld-elf/shared.exp: Add csky to list not xfailing pr22374.

> > >         * testsuite/ld-unique/pr21529.d: Remove csky from xfails

> > >

> >

> > csky-elf linker segfaults on these tests.

>

> Not for me on numerous builds since I made those changes.

>


I got:

FAIL: ld-elf/pr21884
FAIL: ld-unique/pr21529

for csky-elf:

(gdb) r -L/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf
 -T pr21884.t -o tmpdir/dump tmpdir/pr21884a.o tmpdir/pr21884b.o
Starting program:
/export/build/gnu/tools-build/binutils-cross/build-csky-elf/ld/ld-new
-L/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf  -T
pr21884.t -o tmpdir/dump tmpdir/pr21884a.o tmpdir/pr21884b.o
Program received signal SIGSEGV, Segmentation fault.
binary_canonicalize_symtab (abfd=0x522200, alocation=0x522330)
    at /export/gnu/import/git/sources/binutils-gdb/bfd/binary.c:171
171   syms[1].value = sec->size;
(gdb) bt
#0  binary_canonicalize_symtab (abfd=0x522200, alocation=0x522330)
    at /export/gnu/import/git/sources/binutils-gdb/bfd/binary.c:171
#1  0x000000000042e0c7 in bfd_generic_link_read_symbols (
    abfd=abfd@entry=0x522200)
    at /export/gnu/import/git/sources/binutils-gdb/bfd/linker.c:817
#2  0x0000000000430278 in bfd_generic_link_read_symbols (
    abfd=abfd@entry=0x522200)
    at /export/gnu/import/git/sources/binutils-gdb/bfd/linker.c:2178
#3  _bfd_generic_link_output_symbols (output_bfd=output_bfd@entry=0x517030,
    input_bfd=input_bfd@entry=0x522200, info=info@entry=0x50a720 <link_info>,
    psymalloc=psymalloc@entry=0x7fffffffd378)
    at /export/gnu/import/git/sources/binutils-gdb/bfd/linker.c:1982
#4  0x00000000004307c0 in _bfd_generic_final_link (abfd=0x517030,
    info=0x50a720 <link_info>)
    at /export/gnu/import/git/sources/binutils-gdb/bfd/linker.c:1839
#5  0x00000000004191fd in ldwrite ()
    at /export/gnu/import/git/sources/binutils-gdb/ld/ldwrite.c:581
#6  0x0000000000402e66 in main (argc=<optimized out>, argv=<optimized out>)
    at /export/gnu/import/git/sources/binutils-gdb/ld/ldmain.c:456
(gdb)

-- 
H.J.
Alan Modra April 10, 2019, 1:22 a.m. | #4
On Tue, Apr 09, 2019 at 05:50:33AM -0700, H.J. Lu wrote:
> On Tue, Apr 9, 2019 at 3:22 AM Alan Modra <amodra@gmail.com> wrote:

> >

> > On Mon, Apr 08, 2019 at 02:24:12PM -0700, H.J. Lu wrote:

> > > On Mon, Mar 18, 2019 at 5:12 AM Alan Modra <amodra@gmail.com> wrote:

> > > >

> > > > Removes some XPASSes for CSKY (and a FAIL for moxie).

> > > >

> > > >         * testsuite/ld-elf/merge.d: Remove csky from xfails, add moxie.

> > > >         * testsuite/ld-elf/pr21884.d: Remove csky from xfails.

> > > >         * testsuite/ld-elf/shared.exp: Add csky to list not xfailing pr22374.

> > > >         * testsuite/ld-unique/pr21529.d: Remove csky from xfails

> > > >

> > >

> > > csky-elf linker segfaults on these tests.

> >

> > Not for me on numerous builds since I made those changes.

> >

> 

> I got:

> 

> FAIL: ld-elf/pr21884

> FAIL: ld-unique/pr21529

> 

> for csky-elf:


Sorry, yes, I get the same.  The csky target I've been building is
csky-linux, and that's different from csky-elf apparently.  The csky
branch stub support is buggy and enabled by default for csky-elf but
not csky-linux.

When a target has active maintainers, tests that fail with segfaults
should not be swept under the rug by xfailing them.

-- 
Alan Modra
Australia Development Lab, IBM

Patch

diff --git a/ld/testsuite/ld-elf/merge.d b/ld/testsuite/ld-elf/merge.d
index 28c713cd2f..dc0bcc50cc 100644
--- a/ld/testsuite/ld-elf/merge.d
+++ b/ld/testsuite/ld-elf/merge.d
@@ -1,11 +1,11 @@ 
 #source: merge.s
 #ld: -T merge.ld
 #objdump: -s
-#xfail: bfin-*-* cr16-*-* cris*-*-* crx-*-* csky-*-* d10v-*-* d30v-*-* dlx-*-*
+#xfail: bfin-*-* cr16-*-* cris*-*-* crx-*-* d10v-*-* d30v-*-* dlx-*-*
 #xfail: fr30-*-* frv-*-* ft32-*-* h8300-*-* hppa*64*-*-* ip2k-*-* iq2000-*-*
-#xfail: lm32-*-* m68hc11-*-* mcore-*-* mep-*-* metag-*-* mn102*-*-* ms1-*-*
-#xfail: nds32*-*-* nios2-*-* or32-*-* pj-*-* pru-*-* s12z-*-* score-*-* tic6x-*-*
-#xfail: vax-*-* xgate-*-* xstormy16-*-* xtensa*-*-*
+#xfail: lm32-*-* m68hc11-*-* mcore-*-* mep-*-* metag-*-* mn102*-*-* moxie-*-*
+#xfail: ms1-*-* nds32*-*-* nios2-*-* or32-*-* pj-*-* pru-*-* s12z-*-* score-*-*
+#xfail: tic6x-*-* vax-*-* xgate-*-* xstormy16-*-* xtensa*-*-*
 
 .*:     file format .*elf.*
 
diff --git a/ld/testsuite/ld-elf/pr21884.d b/ld/testsuite/ld-elf/pr21884.d
index c230924156..3d44ccfe60 100644
--- a/ld/testsuite/ld-elf/pr21884.d
+++ b/ld/testsuite/ld-elf/pr21884.d
@@ -3,7 +3,7 @@ 
 #ld: -T pr21884.t
 #objdump: -b binary -s
 #xfail: aarch64*-*-* arm*-*-* avr-*-* ia64-*-* m68hc1*-*-* nds32*-*-*
-#xfail: riscv*-*-* score-*-* v850-*-* csky-*-*
+#xfail: riscv*-*-* score-*-* v850-*-*
 # Skip targets which can't change output format to binary.
 
 .*:     file format binary
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 217694c518..fc19bc056b 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -459,6 +459,7 @@  run_ld_link_tests [list \
 	"-shared" "" "$AFLAGS_PIC" "pr22374b.s" {} "pr22374.so" ] \
 ]
 if { ![istarget "alpha-*-*"]
+     && ![istarget "csky-*-*"]
      && ![istarget "frv-*-*"]
      && ![istarget "hppa*-*-*"]
      && ![istarget "i?86-*-*"]
diff --git a/ld/testsuite/ld-unique/pr21529.d b/ld/testsuite/ld-unique/pr21529.d
index 0e6332e42f..fb63794390 100644
--- a/ld/testsuite/ld-unique/pr21529.d
+++ b/ld/testsuite/ld-unique/pr21529.d
@@ -1,6 +1,6 @@ 
 #ld: --oformat binary -T pr21529.ld -e main
 #objdump: -s -b binary
-#xfail: aarch64*-*-* arm*-*-* avr-*-* ia64-*-* m68hc1*-*-* nds32*-*-* riscv*-*-* score-*-* v850-*-* csky-*-*
+#xfail: aarch64*-*-* arm*-*-* avr-*-* ia64-*-* m68hc1*-*-* nds32*-*-* riscv*-*-* score-*-* v850-*-*
 # Skip targets which can't change output format to binary.
 
 #pass