[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[committed] Require eu-unstrip >= 0.168 for objcopy-eu-unstrip*.sh



Hi,

When using eu-unstrip 0.158, we run into:
...
eu-unstrip: cannot find matching section for [1] '.interp'
eu-unstrip: cannot find matching section for [2] '.note.ABI-tag'
   ...
eu-unstrip: cannot find matching section for [26] '.data'
eu-unstrip: cannot find matching section for [27] '.bss'
FAIL: testsuite/dwz.tests/objcopy-eu-unstrip.sh
...

And at eu-unstrip 0.164, this turns into:
...
eu-unstrip: invalid string offset in symbol [70]
FAIL: testsuite/dwz.tests/objcopy-eu-unstrip.sh
...

The test starts passing at eu-unstrip 0.168.

Fix the FAIL by requiring at least eu-unstrip 0.168 for
objcopy-eu-unstrip*.sh.

Committed to trunk.

Thanks,
- Tom

Require eu-unstrip >= 0.168 for objcopy-eu-unstrip*.sh

2019-07-11  Tom de Vries  <tdevries@suse.de>

	* testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh: Require
	eu-unstrip >= 0.168.
	* testsuite/dwz.tests/objcopy-eu-unstrip.sh: Same.

---
 testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh | 9 +++++++++
 testsuite/dwz.tests/objcopy-eu-unstrip.sh           | 9 +++++++++
 2 files changed, 18 insertions(+)

diff --git a/testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh b/testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh
index bc8c0b8..5f63c6d 100644
--- a/testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh
+++ b/testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh
@@ -17,6 +17,15 @@ fi
 
 [ $status -eq 0 ]
 
+version=$(eu-unstrip --version | head -n 1 | cut -d ' ' -f3)
+major=$(echo $version | sed 's%\..*%%')
+minor=$(echo $version | sed 's%.*\.%%')
+if [ $major -gt 0 ] || [ $minor -ge 168 ]; then
+    true
+else
+    exit 77
+fi
+
 eu-unstrip 1.stripped 1.debug -o 1.unstripped
 
 smaller-than.sh 1.unstripped 1
diff --git a/testsuite/dwz.tests/objcopy-eu-unstrip.sh b/testsuite/dwz.tests/objcopy-eu-unstrip.sh
index dc068d9..460da93 100644
--- a/testsuite/dwz.tests/objcopy-eu-unstrip.sh
+++ b/testsuite/dwz.tests/objcopy-eu-unstrip.sh
@@ -13,6 +13,15 @@ fi
 
 [ $status -eq 0 ]
 
+version=$(eu-unstrip --version | head -n 1 | cut -d ' ' -f3)
+major=$(echo $version | sed 's%\..*%%')
+minor=$(echo $version | sed 's%.*\.%%')
+if [ $major -gt 0 ] || [ $minor -ge 168 ]; then
+    true
+else
+    exit 77
+fi
+
 eu-unstrip 1.stripped 1.debug -o 1.unstripped
 
 smaller-than.sh 1.unstripped 1