Skip to content

Mismatch in coverage percentage - GoLang Native fuzzing (Envoy/Gateway) #13393

Open
@sudiptob2

Description

@sudiptob2

Although #13333 fixes the broken coverage reporting in OSS-Fuzz, we noticed that the coverage percentage still differs when compared to running coverage locally using Go’s testing tools.

The following commands are used to collect local coverage in envoy/gateway

# Build the fuzz test binary with coverage support
go test -c \
  -coverpkg=../../../gateway/... \
  -covermode=atomic \
  -o /path/to/fuzz_test_binary \
  github.com/envoyproxy/gateway/test/fuzz

# Run the fuzz test and generate coverage data
go tool test2json -t /path/to/fuzz_test_binary \
  -test.v \
  -test.paniconexit0 \
  -test.run ^FuzzGatewayAPIToXDS$ \
  -test.coverprofile /path/to/output/coverage.out

After that we generated coverage using oss-fuzz infra following the instructions given in this docs. and using the branch in #13333

Attachments

  1. Coverage generated using OSS-Fuzz infra (Google Drive)
  2. Coverage generated locally (Google Drive Link)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions