Skip to content

[dev.fuzz] cmd/go: add fuzz timeout flag #46220

Closed
@katiehockman

Description

@katiehockman

We may want to consider adding a -fuzztimeout flag, which acts similar to a -timeout flag, but for a run of a single input to the f.Fuzz function.

If -fuzztimeout=100ms, then we give each execution of the fuzz function 100 milliseconds to run, and consider it a crasher if that execution takes longer than 100ms to complete.

Note that libFuzzer does this with a -timeout flag.

We could also consider retrofitting the existing -timeout flag, but that might cause confusion. The description for timeout is "If a test binary runs longer than duration d, panic." If someone sets timeout while fuzzing, we don't want to panic when we hit that timeout (which we will if there is no crash).

Related to #44483.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.fuzzIssues related to native fuzzing support

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions