public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* [committed] Make pr24341.sh unsupported test more precise
@ 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 testing on SLE12SP4 aarch64, I ran into a pr24341.sh FAIL.

The FAIL was caused by the multifile containing .debug_info.  This in itself
is not incorrect, and it really means the test is unsupported.

Fix this by:
- adding a mechanism to dwz-tests.exp to handle a return code 77 as
  unsupported ( Similar to the skipped test return code in script-based
  automake tests).
- making pr24341.sh return 77 if the multifile contains .debug_info

Committed to trunk.

Thanks,
- Tom

Make pr24341.sh unsupported test more precise

2019-06-27  Tom de Vries  <tdevries@suse.de>

	* testsuite/dwz.tests/dwz-tests.exp: Handle return code 77 as
	unsupported.
	* testsuite/dwz.tests/pr24341.sh: Mark unsupported if the multifile
	contains .debug_info.

---
 testsuite/dwz.tests/dwz-tests.exp | 10 ++++++++--
 testsuite/dwz.tests/pr24341.sh    |  4 +++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/testsuite/dwz.tests/dwz-tests.exp b/testsuite/dwz.tests/dwz-tests.exp
index 108b167..c1af8b8 100644
--- a/testsuite/dwz.tests/dwz-tests.exp
+++ b/testsuite/dwz.tests/dwz-tests.exp
@@ -70,8 +70,14 @@ foreach test $tests {
 
     cd $dir
     if { [catch { exec sh -e $test } msg] } {
-	puts "$msg"
-	fail "$test"
+	if { [lindex $::errorCode 0] == "CHILDSTATUS" && \
+		 [lindex $::errorCode 2] == 77 } {
+	    unsupported "$test"
+	    exec rm -Rf $dir
+	} else {
+	    puts "$msg"
+	    fail "$test"
+	}
     } else {
 	if { [file exists dwz.info ] } {
 	    set info [exec cat dwz.info]
diff --git a/testsuite/dwz.tests/pr24341.sh b/testsuite/dwz.tests/pr24341.sh
index 5a433a0..4f044f6 100644
--- a/testsuite/dwz.tests/pr24341.sh
+++ b/testsuite/dwz.tests/pr24341.sh
@@ -4,7 +4,9 @@ cp 1 2
 dwz -m 3 1 2
 
 cnt=$(readelf -S 3 | grep "\.debug_info" | wc -l)
-[ $cnt -eq 0 ]
+if [ $cnt -ne 0 ]; then
+    exit 77
+fi
 
 smaller-than.sh 1 $execs/min
 smaller-than.sh 2 $execs/min

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

only message in thread, other threads:[~2019-06-27  9:42 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] Make pr24341.sh unsupported test more precise 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).