Skip to content

introduce --fuzz=<limit> to make tests pass after a certain quantity of fuzz testing has completed #22900

Closed

Description

@andrewrk

There should be two modes of fuzzing, infinite mode, and finite mode. This issue is for finite mode.

Introduce --fuzz=<limit>, where the limit can be one of these:

  • time - a value such as 1s, 2m, 3h, 4d
  • iteration count - a value such as 100, 100K, 100M, 100G

Time-based fuzzing makes all fuzz tests finish successfully after the specified interval has passed. The time is global; adding more fuzz tests and keeping the time the same means less time spent on each fuzz test.

Iteration count based fuzzing makes a given fuzz test finish successfully after that many different inputs have been tried. The number of iterations is per test, so adding more fuzz tests while keeping the same iteration count means it will take longer to finish successfully, since the new tests will be also given the iterations.

Open questions:

  • what about fuzz tests that might want more iterations or more time spent on them relative to each other?
  • should zig build default to --fuzz=1K or similar when fuzz tests are found? If this is set to a reasonably low value, it could be quite valuable in finding shallow bugs quickly. It also opens the door for reporting the seed rather than input and having developers reproduce the failure easily since the iteration count was low.

Activity

  1. added
    enhancement
    on Feb 15, 2025
  2. added this to the 0.15.0 milestone on Feb 15, 2025
  3. added 2 commits that reference this issue on Sep 24, 2025
    d84a078
    0feacc2
  4. added a commit that references this issue on Oct 3, 2025
    f61e0b8
  5. modified the milestones: urgent, 0.16.0 on Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfuzzing

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions