summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-09-07 14:01:36 +0200
committerStephen M. Webb <stephen.webb@bregmasoft.ca>2022-09-17 08:24:36 -0400
commitfedff5ac77c945fc0c5df534074163a784bfa5b3 (patch)
treeaebb586a45597235fe5d18ee5610879bfcb62a87
parentb07103f32784045955d0dcb9867dfb13e7c46cb0 (diff)
downloadlibunwind-fedff5ac77c945fc0c5df534074163a784bfa5b3.tar.gz
tests/run-coredump-unwind: Skip test if no coredump has been created
In some build environments, coredumps are not created even if the corresponding ulimit is positive. This change skips the test if the coredump is missing.
-rwxr-xr-xtests/run-coredump-unwind4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/run-coredump-unwind b/tests/run-coredump-unwind
index ddaac6a4..690362bd 100755
--- a/tests/run-coredump-unwind
+++ b/tests/run-coredump-unwind
@@ -49,6 +49,10 @@ fi
./crasher backing_files
) 2>/dev/null
COREFILE=$TEMPDIR/core*
+if ! test -f "$COREFILE"; then
+ echo "crasher process did not produce coredump, test skipped"
+ exit 77
+fi
# magic option -testcase enables checking for the specific contents of the stack
./test-coredump-unwind $COREFILE -testcase `cat $TEMPDIR/backing_files`