From fd4a4858282491d914988caea6ece438af93a9aa Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Wed, 11 Apr 2018 15:41:40 +0000 Subject: [PATCH] tests: skip -k tests on unsupported architectures * tests/strace-k.test: When actual strace -k output doesn't match the expected output because of limited architecture support, skip the test on architectures that are not currently supported by libdw. --- tests/strace-k.test | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/strace-k.test b/tests/strace-k.test index c189711d..bc2ed06d 100755 --- a/tests/strace-k.test +++ b/tests/strace-k.test @@ -51,5 +51,25 @@ LC_ALL=C grep -E -x -f "$expected" < "$OUT" > /dev/null || { Failed pattern of expected output: $(cat "$expected") Actual output: $(cat "$OUT") __EOF__ + + pattern= + case "$STRACE_ARCH" in + aarch64|i386|ppc*|s390*|sparc*|x32|x86*) + # These architectures are supported by elfutils libdw, + # see grep '\.*\' elfutils/backends + ;; + arm) pattern='No DWARF information found' + # This is also supported by elfutils libdw + # but the latter needs debuginfo for unwinding. + ;; + *) pattern='Unwinding not supported for this architecture' + ;; + esac + if [ -n "$pattern" ] && + LC_ALL=C grep -x " > $pattern" < "$LOG" > /dev/null; then + cat < "$LOG" >&2 + skip_ "stack tracing is not fully supported on $STRACE_ARCH yet" + fi + dump_log_and_fail_with "$STRACE $args output mismatch" }