diff options
| author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2019-11-11 15:53:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-11 15:53:24 +0100 |
| commit | 388f4ae30240f2a675afa5b1febded00284ad450 (patch) | |
| tree | 5ac20b7c7deff76fe4bb9269b1f684e48e2736a0 /test | |
| parent | 01d55372441960c435af8f3bd6b61d1302042728 (diff) | |
| parent | f1fbea96f625a5af9b5321cb98acfc3378b5343e (diff) | |
| download | afl++-388f4ae30240f2a675afa5b1febded00284ad450.tar.gz | |
Merge pull request #106 from vanhauser-thc/radamsa
Radamsa
Diffstat (limited to 'test')
| -rwxr-xr-x | test/test.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/test.sh b/test/test.sh index 781313a7..2cf5f534 100755 --- a/test/test.sh +++ b/test/test.sh @@ -379,6 +379,31 @@ test -e ../libdislocator.so && { rm -f test.out core test-compcov.core core.test-compcov } || $ECHO "$YELLOW[-] libdislocator is not compiled, cannot test" rm -f test-compcov +test -e ../libradamsa.so && { + test -e test-instr.plain || ../afl-clang-fast -o test-instr.plain ../test-instr.c > /dev/null 2>&1 + test -e test-instr.plain || ../afl-gcc-fast -o test-instr.plain ../test-instr.c > /dev/null 2>&1 + test -e test-instr.plain || ../afl-gcc -o test-instr.plain ../test-instr.c > /dev/null 2>&1 + test -e test-instr.plain && { + mkdir -p in + echo 0 > in/in + $ECHO "$GREY[*] running afl-fuzz with radamsa, this will take approx 10 seconds" + { + ../afl-fuzz -RR -V10 -m ${MEM_LIMIT} -i in -o out -- ./test-instr.plain >>errors 2>&1 + } >>errors 2>&1 + test -n "$( ls out/queue/id:000002* 2> /dev/null )" && { + $ECHO "$GREEN[+] libradamsa performs good - and very slow - mutations" + } || { + echo CUT------------------------------------------------------------------CUT + cat errors + echo CUT------------------------------------------------------------------CUT + $ECHO "$RED[!] libradamsa failed" + CODE=1 + } + rm -rf in out errors test-instr.plain + } || { + $ECHO "$YELLOW[-] compilation of test target failed, cannot test libradamsa" + } +} || $ECHO "$YELLOW[-] libradamsa is not compiled, cannot test" $ECHO "$BLUE[*] Testing: qemu_mode" test -e ../afl-qemu-trace && { |
