Skip to content

Commit

Permalink
fuzz: coverage profile generation instructions. (envoyproxy#4193)
Browse files Browse the repository at this point in the history
Signed-off-by: Harvey Tuch <[email protected]>
  • Loading branch information
htuch authored Aug 17, 2018
1 parent ba40cc9 commit 36809d8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/fuzz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,23 @@ source directory for the test, e.g. for `server_fuzz_test` this is
//test/server:server_fuzz_test`. These crash cases can be added to the corpus in
followup PRs to provide fuzzers some interesting starting points for invalid
inputs.

## Coverage reports

Coverage reports, where individual lines are annotated with fuzzing hit counts,
are a useful way to understand the scope and efficacy of the Envoy fuzzers. You
can generate such reports from the ClusterFuzz corpus following the general
ClusterFuzz [instructions for profiling
setup](https://github.com/google/oss-fuzz/blob/master/docs/code_coverage.md).

To filter out unrelated artifacts (e.g. Bazel cache, libfuzzer src), the
following profile command can be used:

```bash
python infra/helper.py profile envoy -- \
-ignore-filename-regex='proc/self/cwd/bazel-out.*' \
-ignore-filename-regex='proc/self/cwd/external.*' \
-ignore-filename-regex='proc/self/cwd/test.*' \
-ignore-filename-regex='.*\.cache.*' \
-ignore-filename-regex='src/libfuzzer.*'
```

0 comments on commit 36809d8

Please sign in to comment.