X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=direct%2Ftest-framework%2Ftests%2Frun_fuzz_test_nand.sh;fp=direct%2Ftest-framework%2Ftests%2Frun_fuzz_test_nand.sh;h=1faeff51b94705256623701cd83dc937bb64b874;hb=c08faae4258b29a794ad55ca160c5a247145c838;hp=0000000000000000000000000000000000000000;hpb=87b33ecd1898c99b9aa2b0abcbb3e6002d6b3532;p=yaffs2.git diff --git a/direct/test-framework/tests/run_fuzz_test_nand.sh b/direct/test-framework/tests/run_fuzz_test_nand.sh new file mode 100755 index 0000000..1faeff5 --- /dev/null +++ b/direct/test-framework/tests/run_fuzz_test_nand.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +iterations=100000 + +[ -z $1 ] || iterations=$1 + + +rm iteration-max-* +touch iteration-max-$iterations + +echo " Running $iterations iterations" +sleep 2 + +for ((i=0; i < $iterations; i++)) +do + + seed=$RANDOM + j=$(( $i % 10 )) + + cycles=$RANDOM + cycles=$(( $cycles % 10000 )) + + rm -f log-nand-*$j + rm -f seed-nand-*$j + echo $seed>seed-nand-for-run-$i + + rm -f emfile-2k-0-*$j + rm -f emfile-2k-1-*$j + rm -f emfile-2k-2-*$j + rm -f emfile-2k-3-*$j + + echo "fuzz" + + [ -e emfile-2k-0 ] && ./fuzzer -p 10000 emfile-2k-0 + [ -e emfile-2k-1 ] && ./fuzzer -p 10000 emfile-2k-1 + [ -e emfile-2k-2 ] && ./fuzzer -p 10000 emfile-2k-2 + [ -e emfile-2k-3 ] && ./fuzzer -p 10000 emfile-2k-3 + + cp emfile-2k-0 emfile-2k-0-$i + cp emfile-2k-1 emfile-2k-1-$i + cp emfile-2k-2 emfile-2k-2-$i + cp emfile-2k-3 emfile-2k-3-$i + + echo "#########" + echo "#########" + echo "#########" + echo "######### Run $i of $iterations with seed $seed" + echo "#########" + echo "#########" + echo "#########" + ./yaffs_test -u -p -s$seed -t 8 -n $cycles -z yaffs2 +done