Skip to content

[dev.fuzz] skip running seed corpus as ordinary test when fuzzing the target #48296

Closed
@katiehockman

Description

@katiehockman

Related to #46222

From @rsc: "check whether a fuzz test matches the -fuzz pattern and if so not run just that one test function as an ordinary test case, because that duplicates work and also because the fuzzing harness can do a better job with infinite loops."

We already have to run all of the seed corpus anyway when -fuzz is set in order to get baseline coverage data. The only time we don't is if instrumentation wasn't done (e.g. someone manually built the test with go test -c). We could refactor the code to make sure the coordinator always has the workers run this seed corpus and correctly report any failing seed corpus in this setup step.

This won't actually change the underlying UX of fuzzing, other than to have fewer lines printed if run with -v since each seed corpus will no longer be run as an individual test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions