2018-08-07 22:22:00 +08:00
|
|
|
# Tests -print_unstable_stats
|
2018-09-05 01:08:47 +08:00
|
|
|
# Disabled on Windows because of differences symbolizing and flakiness.
|
|
|
|
UNSUPPORTED: aarch64, windows
|
2018-08-07 22:22:00 +08:00
|
|
|
|
[libFuzzer] Implement stat::stability_rate based on the percentage of unstable edges.
Summary:
Created a -print_unstable_stats flag.
When -print_unstable_stats=1, we run it 2 more times on interesting inputs poisoning unstable edges in an array.
On program termination, we run PrintUnstableStats() which will print a line with a stability percentage like AFL does.
Patch by Kyungtak Woo (@kevinwkt).
Reviewers: metzman, Dor1s, kcc, morehouse
Reviewed By: metzman, Dor1s, morehouse
Subscribers: delcypher, llvm-commits, #sanitizers, kcc, morehouse, Dor1s
Differential Revision: https://reviews.llvm.org/D49212
llvm-svn: 337187
2018-07-17 00:01:31 +08:00
|
|
|
RUN: %cpp_compiler %S/PrintUnstableStatsTest.cpp -o %t-PrintUnstableStatsTest
|
2018-08-07 07:14:13 +08:00
|
|
|
|
[libFuzzer] Implement stat::stability_rate based on the percentage of unstable edges.
Summary:
Created a -print_unstable_stats flag.
When -print_unstable_stats=1, we run it 2 more times on interesting inputs poisoning unstable edges in an array.
On program termination, we run PrintUnstableStats() which will print a line with a stability percentage like AFL does.
Patch by Kyungtak Woo (@kevinwkt).
Reviewers: metzman, Dor1s, kcc, morehouse
Reviewed By: metzman, Dor1s, morehouse
Subscribers: delcypher, llvm-commits, #sanitizers, kcc, morehouse, Dor1s
Differential Revision: https://reviews.llvm.org/D49212
llvm-svn: 337187
2018-07-17 00:01:31 +08:00
|
|
|
RUN: %run %t-PrintUnstableStatsTest -print_unstable_stats=1 -runs=100000 2>&1 | FileCheck %s --check-prefix=LONG
|
2018-09-05 01:08:47 +08:00
|
|
|
# We do not observe ini functions since we take the minimum hit counts, and minimum hit counts for ini is 0.
|
2018-08-07 07:14:13 +08:00
|
|
|
LONG: UNSTABLE_FUNCTIONS:
|
|
|
|
LONG-NOT: det0()
|
|
|
|
LONG-NOT: det1()
|
|
|
|
LONG-NOT: det2()
|
|
|
|
LONG-NOT: det3()
|
|
|
|
LONG-NOT: det4()
|
|
|
|
LONG-NOT: ini0()
|
|
|
|
LONG-NOT: ini1()
|
|
|
|
LONG-NOT: ini2()
|
|
|
|
LONG-DAG: t0(int)
|
|
|
|
LONG-DAG: t1()
|
|
|
|
LONG-DAG: t2(int, int)
|
|
|
|
LONG-DAG: t3()
|
|
|
|
LONG-DAG: t4(int, int, int)
|
|
|
|
|
|
|
|
LONG-DAG: stat::stability_rate: 27.59
|