From 5427f7ca981a537f14f842a98d5981463efe8c5b Mon Sep 17 00:00:00 2001 From: van Hauser Date: Mon, 12 Oct 2020 05:02:11 +0200 Subject: fix tests for sync mode --- test/test-basic.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/test-basic.sh') diff --git a/test/test-basic.sh b/test/test-basic.sh index 06c40efe..0d16ebd1 100755 --- a/test/test-basic.sh +++ b/test/test-basic.sh @@ -67,7 +67,7 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc { ../afl-fuzz -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 )" && { + test -n "$( ls out/default/queue/id:000002* 2>/dev/null )" && { $ECHO "$GREEN[+] afl-fuzz is working correctly with ${AFL_GCC}" } || { echo CUT------------------------------------------------------------------CUT -- cgit 1.4.1 From aac0ab8c678599312e5d684cd963ec9efa9d758f Mon Sep 17 00:00:00 2001 From: van Hauser Date: Sat, 24 Oct 2020 17:57:05 +0200 Subject: travis test --- test/test-basic.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/test-basic.sh') diff --git a/test/test-basic.sh b/test/test-basic.sh index 0d16ebd1..2a137d52 100755 --- a/test/test-basic.sh +++ b/test/test-basic.sh @@ -104,6 +104,8 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc fi ../afl-tmin -m ${MEM_LIMIT} -i in/in2 -o in2/in2 -- ./test-instr.plain > /dev/null 2>&1 SIZE=`ls -l in2/in2 2>/dev/null | awk '{print$5}'` + ls -l in2 + echo SIZE=$SIZE test "$SIZE" = 1 && $ECHO "$GREEN[+] afl-tmin correctly minimized the testcase" test "$SIZE" = 1 || { $ECHO "$RED[!] afl-tmin did incorrectly minimize the testcase to $SIZE" -- cgit 1.4.1 From 18ad8a097cdf84ef3bb3aad11aa2fe51f9f0f967 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Sat, 24 Oct 2020 18:08:54 +0200 Subject: travis test --- test/test-basic.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/test-basic.sh') diff --git a/test/test-basic.sh b/test/test-basic.sh index 2a137d52..86c6037d 100755 --- a/test/test-basic.sh +++ b/test/test-basic.sh @@ -102,7 +102,7 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc $ECHO "$GRAY[*] no bash available, cannot test afl-cmin.bash" } fi - ../afl-tmin -m ${MEM_LIMIT} -i in/in2 -o in2/in2 -- ./test-instr.plain > /dev/null 2>&1 + ../afl-tmin -m ${MEM_LIMIT} -i in/in2 -o in2/in2 -- ./test-instr.plain #> /dev/null 2>&1 SIZE=`ls -l in2/in2 2>/dev/null | awk '{print$5}'` ls -l in2 echo SIZE=$SIZE -- cgit 1.4.1 From ca938e7c4e0c2829625a505732f14410b6299290 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Sat, 24 Oct 2020 19:11:41 +0200 Subject: asan_build for tmin and analyze --- src/afl-analyze.c | 5 ++++- src/afl-tmin.c | 5 ++++- test/test-basic.sh | 4 +--- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'test/test-basic.sh') diff --git a/src/afl-analyze.c b/src/afl-analyze.c index bfdd66e9..0d9ed423 100644 --- a/src/afl-analyze.c +++ b/src/afl-analyze.c @@ -743,12 +743,15 @@ static void set_up_environment(void) { } - if (!strstr(x, "symbolize=0")) { +#fndef ASAN_BUILD + if (!getenv("AFL_DEBUG") && !strstr(x, "symbolize=0")) { FATAL("Custom ASAN_OPTIONS set without symbolize=0 - please fix!"); } +#endif + } x = get_afl_env("MSAN_OPTIONS"); diff --git a/src/afl-tmin.c b/src/afl-tmin.c index e1d08054..efc12d4f 100644 --- a/src/afl-tmin.c +++ b/src/afl-tmin.c @@ -672,12 +672,15 @@ static void set_up_environment(afl_forkserver_t *fsrv) { } - if (!strstr(x, "symbolize=0")) { +#ifndef ASAN_BUILD + if (!getenv("AFL_DEBUG") && !strstr(x, "symbolize=0")) { FATAL("Custom ASAN_OPTIONS set without symbolize=0 - please fix!"); } +#endif + } x = get_afl_env("MSAN_OPTIONS"); diff --git a/test/test-basic.sh b/test/test-basic.sh index 86c6037d..0d16ebd1 100755 --- a/test/test-basic.sh +++ b/test/test-basic.sh @@ -102,10 +102,8 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc $ECHO "$GRAY[*] no bash available, cannot test afl-cmin.bash" } fi - ../afl-tmin -m ${MEM_LIMIT} -i in/in2 -o in2/in2 -- ./test-instr.plain #> /dev/null 2>&1 + ../afl-tmin -m ${MEM_LIMIT} -i in/in2 -o in2/in2 -- ./test-instr.plain > /dev/null 2>&1 SIZE=`ls -l in2/in2 2>/dev/null | awk '{print$5}'` - ls -l in2 - echo SIZE=$SIZE test "$SIZE" = 1 && $ECHO "$GREEN[+] afl-tmin correctly minimized the testcase" test "$SIZE" = 1 || { $ECHO "$RED[!] afl-tmin did incorrectly minimize the testcase to $SIZE" -- cgit 1.4.1 From 665802673d669634fa1142fc9f99f759bebbf664 Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Thu, 5 Nov 2020 22:58:55 +0100 Subject: typo fixed --- test/test-basic.sh | 2 +- unicorn_mode/unicornafl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test/test-basic.sh') diff --git a/test/test-basic.sh b/test/test-basic.sh index 0d16ebd1..d63f01cf 100755 --- a/test/test-basic.sh +++ b/test/test-basic.sh @@ -118,7 +118,7 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc INCOMPLETE=1 } } || { - $ECHO "$GREY[[*] not an intel platform, skipped tests of afl-gcc" + $ECHO "$GREY[*] not an intel platform, skipped tests of afl-gcc" #this is not incomplete as this feature doesnt exist, so all good AFL_TEST_COUNT=$((AFL_TEST_COUNT-1)) } diff --git a/unicorn_mode/unicornafl b/unicorn_mode/unicornafl index f44ec48f..0bf26f6c 160000 --- a/unicorn_mode/unicornafl +++ b/unicorn_mode/unicornafl @@ -1 +1 @@ -Subproject commit f44ec48f8d5929f243522c1152b5b3c0985a5548 +Subproject commit 0bf26f6c2601e1c1c84998551ed7d50b4108fbdf -- cgit 1.4.1