fixed qemu persistent mode test case :-)
MODIFY
test/test.sh
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"

fixed qemu persistent mode test case :-)