Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is a correct way to disable code coverage instrumentation? #227

Open
ligurio opened this issue Sep 15, 2023 · 0 comments
Open

What is a correct way to disable code coverage instrumentation? #227

ligurio opened this issue Sep 15, 2023 · 0 comments

Comments

@ligurio
Copy link
Contributor

ligurio commented Sep 15, 2023

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.

Footnotes

  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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant