From fedff5ac77c945fc0c5df534074163a784bfa5b3 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 7 Sep 2022 14:01:36 +0200 Subject: 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. --- tests/run-coredump-unwind | 4 ++++ 1 file changed, 4 insertions(+) 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` -- cgit v1.2.1