diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-02-07 17:01:17 +0100 |
---|---|---|
committer | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-02-07 17:01:17 +0100 |
commit | fd8fe4dd088464230df2dc456c5a9fbf905c907f (patch) | |
tree | b6f795fa450eae27512ef9e6d7d3d54a0db72278 /test | |
parent | 1e10e452aaa366c3d06e7eda9f56f127fbf25319 (diff) | |
parent | 7734a9229e5470a2c1c2f67702d4c299cd7a6264 (diff) | |
download | afl++-fd8fe4dd088464230df2dc456c5a9fbf905c907f.tar.gz |
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus
Diffstat (limited to 'test')
-rwxr-xr-x | test/test.sh | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/test/test.sh b/test/test.sh index 57b50eb4..1709468e 100755 --- a/test/test.sh +++ b/test/test.sh @@ -265,12 +265,22 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && { } test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" || { echo 000000000000000000000000 > in/in2 + echo 111 > in/in3 mkdir -p in2 - ../afl-cmin -i in -o in2 -- ./test-instr.plain >/dev/null - CNT=`ls in2/ | wc -l` + ../afl-cmin -i in -o in2 -- ./test-instr.plain >/dev/null 2>&1 # why is afl-forkserver writing to stderr? + CNT=`ls in2/* 2>/dev/null | wc -l` case "$CNT" in - *1) $ECHO "$GREEN[+] afl-cmin correctly minimized the number of testcases" ;; - *) $ECHO "$RED[!] afl-cmin did not correctly minimize the number of testcases" + *2) $ECHO "$GREEN[+] afl-cmin correctly minimized the number of testcases" ;; + *) $ECHO "$RED[!] afl-cmin did not correctly minimize the number of testcases ($CNT)" + CODE=1 + ;; + esac + rm -f in2/in* + AFL_PATH=`pwd`/.. ../afl-cmin.bash -i in -o in2 -- ./test-instr.plain >/dev/null + CNT=`ls in2/* 2>/dev/null | wc -l` + case "$CNT" in + *2) $ECHO "$GREEN[+] afl-cmin.bash correctly minimized the number of testcases" ;; + *) $ECHO "$RED[!] afl-cmin.bash did not correctly minimize the number of testcases ($CNT)" CODE=1 ;; esac |