diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-01-31 18:49:26 +0100 |
---|---|---|
committer | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-01-31 18:49:26 +0100 |
commit | f2511a39ae795469d661a8d1a6347ca281e2b80f (patch) | |
tree | 48ee1fb0d7d54af8f2f9d92d1d9a9eee65efdedf /test | |
parent | f5d46187023b23beff9797e8b461a9a041db3e9f (diff) | |
parent | 4094dcdf888b03144bf918eb1ca2f9ad50764bc8 (diff) | |
download | afl++-f2511a39ae795469d661a8d1a6347ca281e2b80f.tar.gz |
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus
Diffstat (limited to 'test')
-rwxr-xr-x | test/test.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/test.sh b/test/test.sh index 9676d22d..f848ff03 100755 --- a/test/test.sh +++ b/test/test.sh @@ -565,7 +565,7 @@ test -e ../afl-qemu-trace && { $ECHO "$GREY[*] running afl-fuzz for persistent qemu_mode, this will take approx 10 seconds" { - export AFL_QEMU_PERSISTENT_ADDR=0x$(nm test-instr | grep "T main" | awk '{ print $1 }') + export AFL_QEMU_PERSISTENT_ADDR=`expr 0x4$(nm test-instr | grep "T main" | awk '{print $1}' | sed 's/^.......//')` export AFL_QEMU_PERSISTENT_GPR=1 ../afl-fuzz -V10 -Q -i in -o out -- ./test-instr > /dev/null 2>&1 } >>errors 2>&1 @@ -573,9 +573,8 @@ test -e ../afl-qemu-trace && { $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" && { + DIFF=`expr $RUNTIMEP / $RUNTIME` + test "$DIFF" -gt 1 && { # must be at least twice as 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" |