aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rwxr-xr-xsrc/plugins/fuzz_default.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/fuzz_default.sh b/src/plugins/fuzz_default.sh
index 67292cf..c404723 100755
--- a/src/plugins/fuzz_default.sh
+++ b/src/plugins/fuzz_default.sh
@@ -1,5 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -eu
4
3ZZSTARTSEED=0 5ZZSTARTSEED=0
4ZZSTOPSEED=100 6ZZSTOPSEED=100
5ret=0 7ret=0
@@ -14,15 +16,17 @@ then
14 bindir="$bindir/bin" 16 bindir="$bindir/bin"
15fi 17fi
16 18
17if test -x `which zzuf` 19if test ! -x `which zzuf`
18then 20then
21 echo "zzuf not available, not running the test"
19 exit 77 22 exit 77
20fi 23fi
21 24
22if test -x `which timeout` 25if test -x `which timeout`
23then 26then
24 TIMEOUT=timeout 15 27 TIMEOUT="timeout 15"
25else 28else
29 echo "timeout command not found, will not auto-timeout (may cause hang)"
26 TIMEOUT="" 30 TIMEOUT=""
27fi 31fi
28 32
@@ -37,7 +41,7 @@ do
37 do 41 do
38 echo "file $file seed $seed" 42 echo "file $file seed $seed"
39 zzuf -c -s $seed cat "$file" > "$tmpfile" 43 zzuf -c -s $seed cat "$file" > "$tmpfile"
40 if ! "$TIMEOUT $bindir/extract" -i "$tmpfile" > /dev/null 44 if ! $TIMEOUT $bindir/extract -i "$tmpfile" > /dev/null
41 then 45 then
42 echo "$tmpfile with seed $seed failed" 46 echo "$tmpfile with seed $seed failed"
43 mv $tmpfile $tmpfile.keep 47 mv $tmpfile $tmpfile.keep