From e83a1bc0d1c1cf49e0c948c88d28d741d9febb0a Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Sat, 2 Jan 2021 20:18:26 +0100 Subject: test-basic.sh: fix color GRAY to GREY --- test/test-basic.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/test-basic.sh') diff --git a/test/test-basic.sh b/test/test-basic.sh index 79f90ea0..ffd16dd1 100755 --- a/test/test-basic.sh +++ b/test/test-basic.sh @@ -106,7 +106,7 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc ;; esac } else { - $ECHO "$GRAY[*] no bash available, cannot test afl-cmin.bash" + $ECHO "$GREY[*] 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 @@ -242,7 +242,7 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc ;; esac } else { - $ECHO "$GRAY[*] no bash available, cannot test afl-cmin.bash" + $ECHO "$GREY[*] 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 -- cgit 1.4.1 From 3c88de565a9074f202aeef92416472d17b82d697 Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Sat, 2 Jan 2021 23:17:30 +0100 Subject: afl-cmin tests: allow leading whitespace in `wc -l` output --- test/test-basic.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/test-basic.sh') diff --git a/test/test-basic.sh b/test/test-basic.sh index ffd16dd1..8296b6cc 100755 --- a/test/test-basic.sh +++ b/test/test-basic.sh @@ -210,7 +210,7 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc CNT=`ls in2/* 2>/dev/null | wc -l` case "$CNT" in *2) $ECHO "$GREEN[+] afl-cmin correctly minimized the number of testcases" ;; - 1) { + \ *1|1) { # allow leading whitecase for portability test -s in2/* && $ECHO "$YELLOW[?] afl-cmin did minimize to one testcase. This can be a bug or due compiler optimization." test -s in2/* || { $ECHO "$RED[!] afl-cmin did not correctly minimize the number of testcases ($CNT)" @@ -229,8 +229,8 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc CNT=`ls in2/* 2>/dev/null | wc -l` case "$CNT" in *2) $ECHO "$GREEN[+] afl-cmin.bash correctly minimized the number of testcases" ;; - 1) { - test -s in2/* && $ECHO "$YELLOW[?] afl-cmin.bash did minimize to one testcase. This can be a bug or due compiler optimization." + \ *1|1) { # allow leading whitecase for portability + test -s in2/* && $ECHO "$YELLOW[?] afl-cmin.bash did minimize to one testcase. This can be a bug or due compiler optimization." test -s in2/* || { $ECHO "$RED[!] afl-cmin.bash did not correctly minimize the number of testcases ($CNT)" CODE=1 -- cgit 1.4.1