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

[committed] Improve "not supported" test in pr24174.sh



Hi,

When running make CC="clang -fuse-ld=gold" check on ubuntu 18.04, we run into:
...
$ make CC="clang -fuse-ld=gold" check
  ...
child process exited abnormally
FAIL: /home/vries/dwz/dwz.git/testsuite/dwz.tests/pr24174.sh
...

The problem is that:
...
$ objcopy --compress-debug-sections 1
...
does not have the effect of compressing the debug sections, but does drop the
.debug_pubnames and .debug_pubtypes section.  Consequently, the "not supported"
test in pr24174.sh (which checks for file equality) fails.

Fix this by testing for SHF_COMPRESSED instead.

Committed to trunk.

Thanks,
- Tom

Improve "not supported" test in pr24174.sh

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

	* testsuite/dwz.tests/pr24174.sh: Improve "not supported" test.

---
 testsuite/dwz.tests/pr24174.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/testsuite/dwz.tests/pr24174.sh b/testsuite/dwz.tests/pr24174.sh
index 3f1db99..8d1192c 100644
--- a/testsuite/dwz.tests/pr24174.sh
+++ b/testsuite/dwz.tests/pr24174.sh
@@ -1,7 +1,12 @@
 exec=$execs/hello
 cp $exec 1
 objcopy --compress-debug-sections 1
-if cmp -s $exec 1; then
+if readelf -S 1 \
+	| grep -A1 '\.debug_' \
+	| grep -v '\.debug_' \
+	| grep -q 'C'; then
+    true
+else
     exit 77
 fi