-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(forge): Remove proptest runner from fuzzed tests #11061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bff4393
to
4eddd93
Compare
6b0691a
to
3d7bfdd
Compare
3d7bfdd
to
9f034be
Compare
4a84af8
to
36fa94c
Compare
…corpus - add mutate_abi and evict_oldes_corpus fns TODO: load persisted corpus from file on fuzz test start
DaniPopes
reviewed
Aug 12, 2025
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
DaniPopes
reviewed
Aug 13, 2025
DaniPopes
reviewed
Aug 13, 2025
DaniPopes
reviewed
Aug 13, 2025
DaniPopes
previously approved these changes
Aug 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, last nits
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
DaniPopes
approved these changes
Aug 14, 2025
MerkleBoy
pushed a commit
to MerkleBoy/foundry
that referenced
this pull request
Sep 17, 2025
* Remove proptest from fuzzed tests * Persist and replay fuzz failure * Nits * add fuzz coverage metrics config, cleanup * rm unec RefCell, refactor * Add inline fuzz coverage metrics * Same corpus manager for fuzz and invariant tests * Fix fmt * Unify configs * Use corpus manager / abi mutation for fuzz tests - Move hit count in corpus - add mutate_abi and evict_oldes_corpus fns TODO: load persisted corpus from file on fuzz test start * Replay corpus for fuzz tests as well * Add corpus replay failures for fuzz tests too * cleanup fuzz corpus on forge clean, display errors * more abi mutations * rand bit flip mutation + add support for more types * clippy * More mutations - interesting byte and word * More mutations, traces * Review changes * add mutators traits * Simplify * Update crates/evm/fuzz/src/strategies/mod.rs Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> * Avoid clone when mutating array and tuples * Update crates/evm/evm/src/executors/corpus.rs Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> * Update crates/evm/evm/src/executors/corpus.rs Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> * Update crates/evm/evm/src/executors/corpus.rs Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> * Fix typo * use wrapping add / sub for inc/dec mutation * Validate inc/dec, better word mutation, tests * Remove unused validation, early return on validation * mutators to operate on &mut [u8], instrument, cleanup * Mutate fixedbytes, more address mutations * Unify mutators * Add word mutation unit test * Address nits * Update crates/evm/fuzz/src/strategies/param.rs Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> * Update crates/evm/fuzz/src/strategies/param.rs Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> * Rename mutate_random_array/tuple_value --------- Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
forge test
doesn't utilize all available threads for fuzzing/invariants #8898 and bug(forge test
):--fail-fast
flag does not work as it is not applied across multiple test suites #6529Solution
FuzzCorpusConfig
and use for both fuzz and invariantsCorpusManager
from invariant config and reuse in fuzz tests (fuzz corpus is same as invariant but with a single tx;BasicTxDetails
used in for both strategies and same corpus management). move logic for abi mutate inabi_mutate
and use in both fuzz / invariantsMaze comparison
PR Checklist