summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-06-25 17:55:54 -0500
committerRob Landley <rob@landley.net>2015-06-25 17:55:54 -0500
commit325e02ec918246242e89a32c053bf5f767fc37d3 (patch)
tree8324c104d1878546830228093388404d53fc0b66 /scripts
parent394094f34fbdc8de91a8acd95b6de09085480bf6 (diff)
downloadtoybox-325e02ec918246242e89a32c053bf5f767fc37d3.tar.gz
toybox-325e02ec918246242e89a32c053bf5f767fc37d3.tar.bz2
toybox-325e02ec918246242e89a32c053bf5f767fc37d3.zip
Suggestion from Elliott Hughes: tweak test infrastructure to notice if
command exits with high errno and assume it segfaulted.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/runtest.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/runtest.sh b/scripts/runtest.sh
index 8da1089..7f9e8b9 100644
--- a/scripts/runtest.sh
+++ b/scripts/runtest.sh
@@ -86,6 +86,10 @@ testing()
echo -ne "$5" | eval "$2" > actual
RETVAL=$?
+ # Catch segfaults
+ [ $RETVAL -gt 128 ] && [ $RETVAL -lt 255 ] &&
+ echo "exited with signal (or returned $RETVAL)" >> actual
+
cmp expected actual > /dev/null 2>&1
if [ $? -ne 0 ]
then