[PATCH 2/2] run-strip-reloc.sh: Skip debug file check for riscv

Ulf Hermann ulf.hermann@qt.io
Mon Jul 16 10:02:00 GMT 2018


strip does not produce debug files for riscv binaries. If this is a bug
it needs to be fixed in strip, but for now, we disable the tests.

Change-Id: I1bf3deaf1ec0883f345b232bc4ceb56601f5bf79
Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
---
 tests/ChangeLog          | 4 ++++
 tests/run-strip-reloc.sh | 7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index 4e293d4b..d510c35f 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,9 @@
 2018-07-16  Ulf Hermann  <ulf.hermann@qt.io>
 
+	* run-strip-reloc.sh: Skip checking debug files on riscv.
+
+2018-07-16  Ulf Hermann  <ulf.hermann@qt.io>
+
 	* run-strip-reloc.sh: Remove previous testfiles before running the
 	next test.
 
diff --git a/tests/run-strip-reloc.sh b/tests/run-strip-reloc.sh
index 41afeeb8..31671c64 100755
--- a/tests/run-strip-reloc.sh
+++ b/tests/run-strip-reloc.sh
@@ -27,6 +27,7 @@ status=0
 runtest() {
   infile=$1
   is_ET_REL=$2
+  skip_debugfiles=$3
   outfile1=out.stripped1
   debugfile1=out.debug1
   outfile2=out.stripped2
@@ -48,6 +49,10 @@ runtest() {
   testrun_compare ${abs_top_builddir}/src/readelf -a $outfile2 < readelf.out ||
   { echo "*** failure compare stripped files $infile"; status=1; }
 
+  if [ $skip_debugfiles ]; then
+    return
+  fi
+
   # debug files however should be smaller, when ET_REL.
   SIZE1=$(stat -c%s $debugfile1)
   SIZE2=$(stat -c%s $debugfile2)
@@ -105,7 +110,7 @@ runtest hello_ppc64.ko 1
 runtest hello_s390.ko 1
 runtest hello_aarch64.ko 1
 runtest hello_m68k.ko 1
-runtest hello_riscv64.ko 1
+runtest hello_riscv64.ko 1 1
 
 # self test, shouldn't impact non-ET_REL files at all.
 runtest ${abs_top_builddir}/src/strip 0
-- 
2.11.0



More information about the Elfutils-devel mailing list