Skip to content

Commit

Permalink
Merge pull request wolfSSL#27 from connerWolfSSL/master
Browse files Browse the repository at this point in the history
Updates MAIN_SCRIPT.sh to reuse the queue for AFL.
  • Loading branch information
KincadePavich committed Aug 17, 2017
2 parents 501b765 + 888b21e commit 0df4240
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions fuzzers/WOLFSSL-AFL/MAIN_SCRIPT.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,20 @@ for test in ./API_TESTS/*;
do
# move to API test's directory
cd $test
if [ -e ./AFL-Script.sh ]
then
# script is present...running
timeout $time"s" sh AFL-Script.sh
else
if [ "$(ls ./output/queue/*)" ]; then
# script is not present...running with default command
timeout $time"s" ../../AFL/afl-fuzz -i./input/ -o./output/ ./a.out @@
timeout $time"s" ../../AFL/afl-fuzz -i- -o./output/ ./a.out @@
else
if [ -e ./AFL-Script.sh ];
then
# script is present...running
timeout $time"s" sh AFL-Script.sh
else
# script is not present...running with default command
timeout $time"s" ../../AFL/afl-fuzz -i./input/ -o./output/ ./a.out @@
fi
fi
if [ "$(ls ./output/crashes/*)" ]
if [ "$(ls ./output/crashes/*)" ];
then
echo "CRASHES PRESENT AT $test"
results=$results"Crash at $test\n"
Expand All @@ -84,7 +89,7 @@ do
rm ../../reports/crash_reports/"${PWD##*/}"/a.out
#exit 1
fi
if [ "$(ls ./output/hangs/*)" ]
if [ "$(ls ./output/hangs/*)" ];
then
echo "HANGS PRESENT at $test"
results=$results"Hang at $test\n"
Expand Down

0 comments on commit 0df4240

Please sign in to comment.