"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/plugins/fuzz_default.sh" between
libextractor-1.10.tar.gz and libextractor-1.11.tar.gz

About: GNU libextractor is a library used to extract meta-data from files of arbitrary type.

fuzz_default.sh  (libextractor-1.10):fuzz_default.sh  (libextractor-1.11)
#!/bin/sh #!/bin/sh
set -eu
ZZSTARTSEED=0 ZZSTARTSEED=0
ZZSTOPSEED=100 ZZSTOPSEED=100
ret=0 ret=0
# fallbacks for direct, non-"make check" usage # fallbacks for direct, non-"make check" usage
if test x"$testdatadir" = x"" if test x"${testdatadir:-NONE}" = xNONE""
then then
testdatadir=../../test testdatadir=../../test
fi fi
if test x"$bindir" = x"" if test x"${bindir:-NONE}" = xNONE""
then then
bindir=`grep "^prefix = " ./Makefile | cut -d ' ' -f 3` bindir=`grep "^prefix = " ./Makefile | cut -d ' ' -f 3`
bindir="$bindir/bin" bindir="$bindir/bin"
fi fi
if test ! -x `which zzuf`
then
echo "zzuf not available, not running the test"
exit 77
fi
if test -x `which timeout`
then
TIMEOUT="timeout 15"
else
echo "timeout command not found, will not auto-timeout (may cause hang)"
TIMEOUT=""
fi
for file in $testdatadir/test* for file in $testdatadir/test*
do do
if test -f "$file" if test -f "$file"
then then
tmpfile=`mktemp extractortmp.XXXXXX` || exit 1 tmpfile=`mktemp extractortmp.XXXXXX` || exit 1
seed=$ZZSTARTSEED seed=$ZZSTARTSEED
trap "echo $tmpfile caused SIGSEGV ; exit 1" SEGV trap "echo $tmpfile caused SIGSEGV ; exit 1" SEGV
while [ $seed -lt $ZZSTOPSEED ] while [ $seed -lt $ZZSTOPSEED ]
do do
echo "file $file seed $seed" echo "file $file seed $seed"
zzuf -c -s $seed cat "$file" > "$tmpfile" zzuf -c -s $seed cat "$file" > "$tmpfile"
if ! "$bindir/extract" -i "$tmpfile" > /dev/null if ! $TIMEOUT $bindir/extract -i "$tmpfile" > /dev/null
then then
echo "$tmpfile with seed $seed failed" echo "$tmpfile with seed $seed failed"
mv $tmpfile $tmpfile.keep mv $tmpfile $tmpfile.keep
ret=1 ret=1
fi fi
seed=`expr $seed + 1` seed=`expr $seed + 1`
done done
rm -f "$tmpfile" rm -f "$tmpfile"
fi fi
done done
exit $ret exit $ret
 End of changes. 6 change blocks. 
5 lines changed or deleted 21 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)