public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* [committed] Improve "not supported" test in pr24174.sh
@ 2019-01-01  0:00 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-01-01  0:00 UTC (permalink / raw)
  To: dwz, jakub

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
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-05 17:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01  0:00 [committed] Improve "not supported" test in pr24174.sh Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).