OSDN Git Service

Suggestion from Elliott Hughes: tweak test infrastructure to notice if
authorRob Landley <rob@landley.net>
Thu, 25 Jun 2015 22:55:54 +0000 (17:55 -0500)
committerRob Landley <rob@landley.net>
Thu, 25 Jun 2015 22:55:54 +0000 (17:55 -0500)
command exits with high errno and assume it segfaulted.

scripts/runtest.sh

index 8da1089..7f9e8b9 100644 (file)
@@ -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