aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/fuzz_default.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-10-29 21:22:05 +0100
committerChristian Grothoff <christian@grothoff.org>2020-10-29 21:22:05 +0100
commit7a6a7f54d1f27c6b3520fe8cffebeebc6c272ca0 (patch)
tree3e17f8969de279e8f73055f306b731d0f096e357 /src/plugins/fuzz_default.sh
parent161aecb855156aadbf167b31341614807ca336ca (diff)
downloadlibextractor-7a6a7f54d1f27c6b3520fe8cffebeebc6c272ca0.tar.gz
libextractor-7a6a7f54d1f27c6b3520fe8cffebeebc6c272ca0.zip
fix #6613
Diffstat (limited to 'src/plugins/fuzz_default.sh')
-rwxr-xr-xsrc/plugins/fuzz_default.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/plugins/fuzz_default.sh b/src/plugins/fuzz_default.sh
index 8b64539..67292cf 100755
--- a/src/plugins/fuzz_default.sh
+++ b/src/plugins/fuzz_default.sh
@@ -14,6 +14,17 @@ then
14 bindir="$bindir/bin" 14 bindir="$bindir/bin"
15fi 15fi
16 16
17if test -x `which zzuf`
18then
19 exit 77
20fi
21
22if test -x `which timeout`
23then
24 TIMEOUT=timeout 15
25else
26 TIMEOUT=""
27fi
17 28
18for file in $testdatadir/test* 29for file in $testdatadir/test*
19do 30do
@@ -26,11 +37,11 @@ do
26 do 37 do
27 echo "file $file seed $seed" 38 echo "file $file seed $seed"
28 zzuf -c -s $seed cat "$file" > "$tmpfile" 39 zzuf -c -s $seed cat "$file" > "$tmpfile"
29 if ! "$bindir/extract" -i "$tmpfile" > /dev/null 40 if ! "$TIMEOUT $bindir/extract" -i "$tmpfile" > /dev/null
30 then 41 then
31 echo "$tmpfile with seed $seed failed" 42 echo "$tmpfile with seed $seed failed"
32 mv $tmpfile $tmpfile.keep 43 mv $tmpfile $tmpfile.keep
33 ret=1 44 ret=1
34 fi 45 fi
35 seed=`expr $seed + 1` 46 seed=`expr $seed + 1`
36 done 47 done