summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Moroz <mmoroz@chromium.org>2018-07-17 20:37:40 +0000
committerMax Moroz <mmoroz@chromium.org>2018-07-17 20:37:40 +0000
commit9d27f84cb4ddc9a9401507f60cb3ac09a37231a4 (patch)
treea8b7994e5c82cfb9cc549502136cbb1c9ccbac3f /test
parenta22026054ba1a9befadef306c3f56481b4397ab3 (diff)
[libFuzzer] Mutation tracking and logging implemented.
Summary: Code now exists to track number of mutations that are used in fuzzing in total and ones that produce new coverage. The stats are currently being dumped to the command line. Patch by Kodé Williams (@kodewilliams). Reviewers: metzman, Dor1s, morehouse, kcc Reviewed By: Dor1s, morehouse, kcc Subscribers: delcypher, kubamracek, kcc, morehouse, llvm-commits, #sanitizers, mgorny Differential Revision: https://reviews.llvm.org/D48054 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337324 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/fuzzer/fuzzer-mutationstats.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/fuzzer/fuzzer-mutationstats.test b/test/fuzzer/fuzzer-mutationstats.test
new file mode 100644
index 000000000..95743a818
--- /dev/null
+++ b/test/fuzzer/fuzzer-mutationstats.test
@@ -0,0 +1,5 @@
+RUN: %cpp_compiler %S/SimpleTest.cpp -o %t-MutationStatsTest
+RUN: not %run %t-MutationStatsTest -print_mutation_stats=1 2>&1 | FileCheck %s
+
+# Ensures there are some non-zero values in the usefulness percentages printed.
+CHECK: stat::mutation_usefulness: {{[0-9]+\.[0-9]+}}