This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: proper xfail handling in ld-lib.exp


At present, testsuite/ld-elf/elf.exp is the only user of
run_ld_link_exec_tests in lib/ld-lib.exp.  It is not possible to
properly xfail each test in the list of tests passed to this proc.
This patch allows a list of target triplets to be passed, too.

NetBSD's dynamic loader does not currently support init/fini arrays,
so these tests must be XFAILed for the time being.

Okay for mainline?
Ben

2005-07-25  Ben Elliston  <bje@gnu.org>

        * lib/ld-lib.exp (run_ld_link_exec_tests): Add new parameter
        ${targets_to_xfail} that is applied for each test item.
        * ld-elf/elf.exp: Pass *-*-netbsdelf* as an xfailed target.

Index: testsuite/lib/ld-lib.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/lib/ld-lib.exp,v
retrieving revision 1.36
diff -u -r1.36 ld-lib.exp
--- testsuite/lib/ld-lib.exp    14 Jul 2005 18:42:01 -0000      1.36
+++ testsuite/lib/ld-lib.exp    25 Jul 2005 09:52:13 -0000
@@ -1263,17 +1263,18 @@
     }
 }
 
-# List contains test-items with 3 items followed by 1 lists, 2 items
+# targets_to_xfail is a list of target triplets to be xfailed.
+# ldtests contains test-items with 3 items followed by 1 lists, 2 items
 # and one optional item:
-# 0:name
-# 1:ld options
-# 2:assembler options
-# 3:filenames of assembler files
-# 4:name of output file
-# 5:expected output
-# 6:compiler flags (optional)
+#   0:name
+#   1:ld options
+#   2:assembler options
+#   3:filenames of assembler files
+#   4:name of output file
+#   5:expected output
+#   6:compiler flags (optional)

-proc run_ld_link_exec_tests { ldtests } {
+proc run_ld_link_exec_tests { targets_to_xfail ldtests } {
     global ld
     global as
     global srcdir
@@ -1284,6 +1285,9 @@
     global errcnt
 
     foreach testitem $ldtests {
+       foreach target $targets_to_xfail {
+           setup_xfail $target
+       }
        set testname [lindex $testitem 0]
        set ld_options [lindex $testitem 1]
        set as_options [lindex $testitem 2]
Index: testsuite/ld-elf/elf.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/elf.exp,v
retrieving revision 1.6
diff -u -r1.6 elf.exp
--- testsuite/ld-elf/elf.exp    14 Jul 2005 17:02:10 -0000      1.6
+++ testsuite/ld-elf/elf.exp    25 Jul 2005 09:52:08 -0000
@@ -43,4 +43,5 @@
     {"static fini array" "-static" "" {fini.c} "fini" "fini.out"}
 }
 
-run_ld_link_exec_tests $array_tests
+# NetBSD ELF systems do not currently support the .*_array sections.
+run_ld_link_exec_tests [list "*-*-netbsdelf*"] $array_tests

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]