]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add noxfail option to run_dump_test
authorAlan Modra <amodra@gmail.com>
Thu, 10 Oct 2024 00:13:16 +0000 (10:43 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 16 Oct 2024 04:24:00 +0000 (14:54 +1030)
The noxfail option is useful in situations like pr23658-1e which
fails on all microblaze ELF targets except microblaze-linux.  This was
possible to handle by writing a small proc and use that as an xfail
predicate, or painstakingly listing all microblaze ELF targets, but
this is simpler.  The patch also fixes some other FAILs and XPASSes of
the pr23658 tests.

binutils/
* testsuite/lib/binutils-common.exp (run_dump_test): Support
noxfail.
ld/
* testsuite/ld-elf/pr23658-1a.d: Don't xfail m68hc12.
* testsuite/ld-elf/pr23658-1e.d: Likewise.  xfail xstormy16
and correct microblaze xfails.

binutils/testsuite/lib/binutils-common.exp
ld/testsuite/ld-elf/pr23658-1a.d
ld/testsuite/ld-elf/pr23658-1e.d

index 403103da3664b7a192aa44a432abc26ff177b12c..03e8dbb855b93194fd616e7141e86d8c79374673 100644 (file)
@@ -897,6 +897,9 @@ proc prune_dump_output { output } {
 #      Run this test and it is is expected to fail on a specified list
 #      of targets.
 #
+#   noxfail: GLOB|PROC ...
+#      Of targets that match the xfail list, this list won't fail.
+#
 #   error: REGEX
 #      An error with message matching REGEX must be emitted for the test
 #      to pass.  The DUMPPROG, addr2line, nm, objdump, readelf and size
@@ -1001,6 +1004,7 @@ proc run_dump_test { name {extra_options {}} } {
     set opts(warning) {}
     set opts(warning_output) {}
     set opts(xfail) {}
+    set opts(noxfail) {}
 
     set in_extra 0
     foreach i [concat $opt_array {{} {}} $extra_options] {
@@ -1031,6 +1035,7 @@ proc run_dump_test { name {extra_options {}} } {
 
        switch -- $opt_name {
            xfail {}
+           noxfail {}
            target {}
            alltargets {}
            notarget {}
@@ -1296,6 +1301,12 @@ proc run_dump_test { name {extra_options {}} } {
            break
        }
     }
+    foreach targ $opts(noxfail) {
+       if [match_target $targ] {
+           clear_xfail "*-*-*"
+           break
+       }
+    }
 
     foreach as_flags $as_final_flags {
        # Assemble each file.
index 21847f9350c74aae9ef0b107d01991bce57c9955..c2caf496ac6fe36c5865ff566fe30422e6513e15 100644 (file)
@@ -8,7 +8,6 @@
 # Since generic linker targets don't place SHT_NOTE sections as orphan,
 # SHT_NOTE sections aren't grouped nor sorted.
 #xfail: [uses_genelf]
-#xfail: m68hc12-*
 # The following targets place .note.gnu.build-id in unusual places.
 #xfail: d10v-* pru-*
 
index 992c7484ff7a54c61dbfe08fcb9f0f061a90ed46..dbb05e6293e03a33981419d793bf3a7a972bb99a 100644 (file)
 # placed before text sections and there should no other note sections
 # between .note.gnu.build-id and text sections.
 #xfail: [uses_genelf]
-#xfail: m68hc12-*
 # The following targets don't support --build-id.
 #xfail: cr16-* crx-* visium-*
 # The following targets place .note.gnu.build-id in unusual places.
-#xfail: *-*-hpux* arc*-* avr-* microblaze-*-* nds32*-* spu-*-*
+#xfail: *-*-hpux*
+#xfail: arc*-* avr-* m68hc1*-* microblaze*-* nds32*-* spu-*-* xstormy16-*-*
+#noxfail: microblaze*-linux*
 
 #...
  +[0-9]+ +\.note.gnu.build-id +