testsuite-ignore-elflint
authorDebian Elfutils Maintainers <debian-gcc@lists.debian.org>
Wed, 22 Apr 2026 15:20:17 +0000 (17:20 +0200)
committerMatthias Klose <doko@debian.org>
Wed, 22 Apr 2026 15:20:17 +0000 (17:20 +0200)
On many architectures this test fails because binaries/libs produced by
binutils don't pass elflint. However elfutils shouldn't FTBFS because of this.

So we run the tests on all archs to see what breaks, but if it breaks we ignore
the result (exitcode 77 means: this test was skipped).

Gbp-Pq: Name testsuite-ignore-elflint.diff

tests/run-elflint-self.sh
tests/test-subr.sh

index 58fa7d0fb21260d38fdca493e45f2dd6a840e5a5..85d21a562e3167700f8ff33da1694a8987ce4406 100755 (executable)
@@ -18,5 +18,5 @@
 
 . $srcdir/test-subr.sh
 
-testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
+testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld
 testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld
index 623b5b77451144aabcaf8a8c55bab32bfce71cd2..7ef9ec3f1a5e1ffca24d64dd0ef9b3905f7d14c8 100644 (file)
@@ -239,3 +239,18 @@ testrun_on_self_quiet()
   # Only exit if something failed
   if test $exit_status != 0; then exit $exit_status; fi
 }
+
+# Same as testrun_on_self(), but skip on failure.
+testrun_on_self_skip()
+{
+  exit_status=0
+
+  for file in $self_test_files; do
+      testrun $* $file \
+         || { echo "*** failure in $* $file"; exit_status=77; }
+  done
+
+  # Only exit if something failed
+  if test $exit_status != 0; then exit $exit_status; fi
+}
+