This repository has been archived by the owner on Mar 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Make tests using ./test-instr use paths that are less likely to be optimized out.
- Loading branch information
1 parent
ac2b6ac
commit 1f414d5
Showing
3 changed files
with
6 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,7 @@ ifndef AFL_NO_X86 | |
test_build: afl-gcc afl-as afl-showmap | ||
@echo "[*] Testing the CC wrapper and instrumentation output..." | ||
unset AFL_USE_ASAN AFL_USE_MSAN; AFL_QUIET=1 AFL_INST_RATIO=100 AFL_PATH=. ./$(TEST_CC) $(CFLAGS) test-instr.c -o test-instr $(LDFLAGS) | ||
echo 0 | ./afl-showmap -m none -q -o .test-instr0 ./test-instr | ||
./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null | ||
echo 1 | ./afl-showmap -m none -q -o .test-instr1 ./test-instr | ||
@rm -f test-instr | ||
@cmp -s .test-instr0 .test-instr1; DR="$$?"; rm -f .test-instr0 .test-instr1; if [ "$$DR" = "0" ]; then echo; echo "Oops, the instrumentation does not seem to be behaving correctly!"; echo; echo "Please ping <[email protected]> to troubleshoot the issue."; echo; exit 1; fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,9 @@ endif | |
test_build: $(PROGS) | ||
@echo "[*] Testing the CC wrapper and instrumentation output..." | ||
unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; AFL_QUIET=1 AFL_PATH=. AFL_CC=$(CC) ../afl-clang-fast $(CFLAGS) ../test-instr.c -o test-instr $(LDFLAGS) | ||
echo 0 | ../afl-showmap -m none -q -o .test-instr0 ./test-instr | ||
# Use /dev/null to avoid problems with optimization messing up expected | ||
# branches. See https://github.com/google/AFL/issues/30. | ||
../afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null | ||
echo 1 | ../afl-showmap -m none -q -o .test-instr1 ./test-instr | ||
@rm -f test-instr | ||
@cmp -s .test-instr0 .test-instr1; DR="$$?"; rm -f .test-instr0 .test-instr1; if [ "$$DR" = "0" ]; then echo; echo "Oops, the instrumentation does not seem to be behaving correctly!"; echo; echo "Please ping <[email protected]> to troubleshoot the issue."; echo; exit 1; fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters