[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[committed] Make pr24341.sh unsupported test more precise
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