google / google/libprotobuf-mutator
What is a correct way to disable code coverage instrumentation?
- Dominant language
- C++
- Stars
- 667
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Description
I'm using tests [^1] that uses LPM & Protobuf library. LPM is built using `ExternalProjectAdd` in CMake, see [^2].
Fuzzing tests are running in OSS Fuzz Infrastructure (see `build.sh` in [^3]), where Fuzz Introspector reports are built.
Unfortunately, Fuzz Introspector includes LPM and Protobuf library to reports, and due to this overall code coverage result is wrong [^4] and Protobuf functions bothers me to analyze reports, see an example in [^5].
What is a correct way to disable code coverage instrumentation?
I see there is `LIB_PROTO_MUTATOR_HAS_NO_COVERAGE`, but it is not documented.
[^1]: https://github.com/ligurio/lua-c-api-tests
[^2]: https://github.com/ligurio/lua-c-api-tests/blob/e4c2a46510a72baf6e3741dbd7529e74aaf698e6/cmake/ProtobufMutator.cmake#L28-L45
[^3]: https://github.com/google/oss-fuzz/blob/318f612d3054293201a494190715bd6a207e477c/projects/lua/build.sh#L57-L75
[^4]: https://storage.googleapis.com/oss-fuzz-coverage/lua/reports/20230915/linux/src/testdir/build/tests/external.protobuf_mutator/src/report.html
[^5]: https://storage.googleapis.com/oss-fuzz-introspector/lua/inspector-report/20230915/fuzz_report.html#Fuzzer:-luaL_loadbuffer_proto_test
Contributor guide
Assessment
This issue has not been assessed yet.