commit 5fd1ef84ec3958179999856824beb15b711b1c3c
Author: Bertram Felgenhauer <int-e@gmx.de>
Date:   Fri Jan 30 16:02:19 2009 +0100

    (tests) refactor run.sh script

diff --git a/test/run.sh b/test/run.sh
index e9c1de7..87686cf 100755
--- a/test/run.sh
+++ b/test/run.sh
@@ -11,36 +11,41 @@ mkdir -p log
 
 FAILED=""
 
+DRIVER_DEFAULTS="-u-1 -E 0 --no-compat -e -N --cleanup-time -1 --reset-time -1
+    --max-array 0 --max-callouts 0 --max-bytes 0 --max-file 0 -s-1
+    -sv-1 --max-malloc 0 --min-malloc 0 -ru0 -rm0 -rs0 --no-strict-euids
+    --no-wizlist-file --check-refcounts --check-state 2 --access-file none
+    --access-log none -f test 65432"
+
+export DRIVER DRIVER_DEFAULTS
+
 for testdir in ${@:-t-*}
 do
-    if [ -d "$testdir" ]
-    then
-	${DRIVER} -u-1 -E 0 -Mmaster -m"$testdir" --debug-file "../log/result.$testdir.log" --no-compat -e -N \
-              --cleanup-time -1 --reset-time -1 --max-array 0 \
-	      --max-callouts 0 --max-bytes 0 --max-file 0 \
-	      -s-1 -sv-1 --max-malloc 0 --min-malloc 0 \
-	      -ru0 -rm0 -rs0 --no-strict-euids --no-wizlist-file \
-	      --check-refcounts --check-state 2 \
-	      --access-file none --access-log none \
-	      -f test 65432 > /dev/null || { echo "Test $testdir FAILED."; FAILED="${FAILED}\n\t$testdir"; }
-    elif [ -r "$testdir" ]
+    if [ -d "${testdir}" ]
     then
-	${DRIVER} -u-1 -E 0 -M"$testdir" -m. --debug-file "./log/result.$testdir.log" --no-compat -e -N \
-              --cleanup-time -1 --reset-time -1 --max-array 0 \
-	      --max-callouts 0 --max-bytes 0 --max-file 0 \
-	      -s-1 -sv-1 --max-malloc 0 --min-malloc 0 \
-	      -ru0 -rm0 -rs0 --no-strict-euids --no-wizlist-file \
-	      --check-refcounts --check-state 2 \
-	      --access-file none --access-log none \
-	      -f test 65432 > /dev/null || { echo "Test $testdir FAILED."; FAILED="${FAILED}\n\t$testdir"; }
+	${DRIVER} ${DRIVER_DEFAULTS} -Mmaster -m"${testdir}" \
+              --debug-file "../log/result.${testdir}.log"  > /dev/null \
+        || { echo "Test ${testdir} FAILED."; FAILED="${FAILED}\n\t${testdir}"; }
+        continue
     fi
+    case ${testdir} in
+    *.c)
+	${DRIVER} ${DRIVER_DEFAULTS} -M"${testdir}" -m. \
+              --debug-file "./log/result.${testdir}.log" > /dev/null \
+        || { echo "Test ${testdir} FAILED."; FAILED="${FAILED}\n\t${testdir}"; }
+    ;;
+    *.sh)
+        /bin/sh ./${testdir} 2>&1 > "./log/result.${testdir}.log" \
+        || { echo "Test ${testdir} FAILED."; FAILED="${FAILED}\n\t${testdir}"; }
+    ;;
+    esac
 done
 
-if [ -z "$FAILED" ]
+if [ -z "${FAILED}" ]
 then
     echo "Tests run successfully."
 else
     echo "The following tests FAILED:"
-    echo -e "$FAILED"
+    echo -e "${FAILED}"
     exit 1
 fi

==============================================================================
commit 190bfcdd839f653b3028760d14d497a290e2df6b
Author: Bertram Felgenhauer <int-e@gmx.de>
Date:   Fri Jan 30 16:03:34 2009 +0100

    add test for #604

diff --git a/test/generic/master.c b/test/generic/master.c
new file mode 100644
index 0000000..c315229
--- /dev/null
+++ b/test/generic/master.c
@@ -0,0 +1,8 @@
+#include "/inc/base.inc"
+#include "/inc/gc.inc"
+
+string *epilog(int eflag)
+{
+    shutdown();
+    return 0;
+}
diff --git a/test/t-0000640.sh b/test/t-0000640.sh
new file mode 100644
index 0000000..f457dc9
--- /dev/null
+++ b/test/t-0000640.sh
@@ -0,0 +1,5 @@
+ulimit -c 0
+for extra in 0 01 012 0123 01234 012345 0123456 01234567; do
+    ${DRIVER}  --erq "/bin/true ${extra}" ${DRIVER_DEFAULTS/ -N / } \
+        -Mgeneric/master -m. --debug-file=/dev/null || exit 1
+done
