Skip to content

[Bug]: Unknown fuzz_runs config applied in foundry.toml for fuzz tests #512

@0xdevant

Description

@0xdevant

Describe the bug

Unknown config fuzz_runs is used to specified the number of fuzz runs for fuzz tests, instead should either be specified as runs under [fuzz], or as fuzz.runs under [profile.<profile_name>].

Expected Behavior

Fixing the original fuzz_runs = 10_000 to fuzz.runs = 10_000 under [profile.default] is not enough because the number is too large which will cause some tests to fail due to vm.assume rejecting too many inputs, reducing number of fuzz runs to 3000 i.e. fuzz.runs = 1_000 would fix this warning and actually applies the correct number of fuzz runs.

Also fixing the fuzz_runs = 100_000 under [profile.ci] to fuzz.runs = 5_000, probably need to adjust if the CI failed as well.

To Reproduce

If you run forge test using the current foundry.toml you will see a warning when compiling: "Warning: Found unknown 'fuzz_runs' config for profile 'default' defined in foundry.toml.", and the number of fuzz run is actually limited to the default 256.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions