aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-10-10 10:43:16 +1030
committerAlan Modra <amodra@gmail.com>2024-10-16 14:54:00 +1030
commitbc85bc665a95b84aba854653b4289a3b1c4fbf05 (patch)
tree617a27830ced932e47636f80bcbc500e91eb74e6 /binutils/testsuite
parent76eab8f47a743bde86be410bce8fd8382eaea6c2 (diff)
downloadbinutils-bc85bc665a95b84aba854653b4289a3b1c4fbf05.zip
binutils-bc85bc665a95b84aba854653b4289a3b1c4fbf05.tar.gz
binutils-bc85bc665a95b84aba854653b4289a3b1c4fbf05.tar.bz2
Add noxfail option to run_dump_test
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.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r--binutils/testsuite/lib/binutils-common.exp11
1 files changed, 11 insertions, 0 deletions
diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 403103d..03e8dbb 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -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.