aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-23 21:23:10 +0200
committervan Hauser <vh@thc.org>2020-06-23 21:23:10 +0200
commit49a769ac06c78b90882a646f1bcf60248e584b5f (patch)
tree72c5a200f3b28a76bbdb77a193cf2fcae229cde2 /test
parent2b450aeb20c31dc26d84d1429ad10b01af7138d8 (diff)
downloadafl++-49a769ac06c78b90882a646f1bcf60248e584b5f.tar.gz
lto whitelist in test.sh
Diffstat (limited to 'test')
-rwxr-xr-xtest/test.sh31
1 files changed, 15 insertions, 16 deletions
diff --git a/test/test.sh b/test/test.sh
index 109f21cc..0cf796be 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -459,24 +459,23 @@ test -e ../afl-clang-lto -a -e ../afl-llvm-lto-instrumentation.so && {
}
rm -f test-instr.plain
-# Disabled whitelist until I have a different solution -mh
-# echo foobar.c > whitelist.txt
-# AFL_LLVM_WHITELIST=whitelist.txt ../afl-clang-lto -o test-compcov test-compcov.c > test.out 2>&1
-# test -e test-compcov && {
-# grep -q "No instrumentation targets found" test.out && {
-# $ECHO "$GREEN[+] llvm_mode LTO whitelist feature works correctly"
-# } || {
-# $ECHO "$RED[!] llvm_mode LTO whitelist feature failed"
-# CODE=1
-# }
-# } || {
-# $ECHO "$RED[!] llvm_mode LTO whitelist feature compilation failed"
-# CODE=1
-# }
-# rm -f test-compcov test.out whitelist.txt
+ echo foobar.c > whitelist.txt
+ AFL_DEBUG=1 AFL_LLVM_WHITELIST=whitelist.txt ../afl-clang-lto -o test-compcov test-compcov.c > test.out 2>&1
+ test -e test-compcov && {
+ grep -q "No instrumentation targets found" test.out && {
+ $ECHO "$GREEN[+] llvm_mode LTO whitelist feature works correctly"
+ } || {
+ $ECHO "$RED[!] llvm_mode LTO whitelist feature failed"
+ CODE=1
+ }
+ } || {
+ $ECHO "$RED[!] llvm_mode LTO whitelist feature compilation failed"
+ CODE=1
+ }
+ rm -f test-compcov test.out whitelist.txt
../afl-clang-lto -o test-persistent ../examples/persistent_demo/persistent_demo.c > /dev/null 2>&1
test -e test-persistent && {
- echo foo | ../afl-showmap -o /dev/null -q -r ./test-persistent && {
+ echo foo | ../afl-showmap -m none -o /dev/null -q -r ./test-persistent && {
$ECHO "$GREEN[+] llvm_mode LTO persistent mode feature works correctly"
} || {
$ECHO "$RED[!] llvm_mode LTO persistent mode feature failed to work"