diff options
author | van Hauser <vh@thc.org> | 2019-10-15 17:14:59 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2019-10-15 17:14:59 +0200 |
commit | 77695d75bb9619807dc27d3542e81b6b6332e2cf (patch) | |
tree | 2f9c2039c14bcbae42be7ea4fef8c44cdf3f4b82 /test | |
parent | 3dec452a8a5a21fee524c5e4bc81e680c3a1fc04 (diff) | |
download | afl++-77695d75bb9619807dc27d3542e81b6b6332e2cf.tar.gz |
test.sh check to see if qemu persistent mode is faster
Diffstat (limited to 'test')
-rwxr-xr-x | test/test.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test.sh b/test/test.sh index d5372233..4fcd132e 100755 --- a/test/test.sh +++ b/test/test.sh @@ -234,6 +234,7 @@ test -e ../afl-qemu-trace && { } >>errors 2>&1 test -n "$( ls out/queue/id:000002* 2> /dev/null )" && { $ECHO "$GREEN[+] afl-fuzz is working correctly with qemu_mode" + RUNTIME=`grep execs_done out/fuzzer_stats | awk '{print$3}'` } || { echo CUT------------------------------------------------------------------CUT cat errors @@ -268,6 +269,18 @@ test -e ../afl-qemu-trace && { } >>errors 2>&1 test -n "$( ls out/queue/id:000002* 2> /dev/null )" && { $ECHO "$GREEN[+] afl-fuzz is working correctly with persistent qemu_mode" + RUNTIMEP=`grep execs_done out/fuzzer_stats | awk '{print$3}'` + test -n "$RUNTIME" -a -n "$RUNTIMEP" && { + SLOW=`expr $RUNTIME '*' 103` # persistent mode should be at least 3% faster - minimum! + FAST=`expr $RUNTIMEP '*' 100` + test "$SLOW" -lt "$FAST" && { + $ECHO "$GREEN[+] persistent qemu_mode was noticeable faster than standard qemu_mode" + } || { + $ECHO "$YELLOW[?] persistent qemu_mode was not noticeable faster than standard qemu_mode" + } + } || { + $ECHO "$YELLOW[?] we got no data on executions performed? weird!" + } } || { echo CUT------------------------------------------------------------------CUT cat errors |