From: Rob Landley Date: Thu, 25 Jun 2015 22:55:54 +0000 (-0500) Subject: Suggestion from Elliott Hughes: tweak test infrastructure to notice if X-Git-Tag: android-x86-6.0-r1~58^2~151 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=325e02ec918246242e89a32c053bf5f767fc37d3;p=android-x86%2Fexternal-toybox.git Suggestion from Elliott Hughes: tweak test infrastructure to notice if command exits with high errno and assume it segfaulted. --- diff --git a/scripts/runtest.sh b/scripts/runtest.sh index 8da1089e..7f9e8b92 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