`max_test_reject_rate`: set a maximum test rejection rate per test function
Component
Forge
Describe the feature you would like
I never found using max_test_rejects and vm.assume helpful, because changing the number of fuzz runs to a different value requires re-calibrating max_test_rejects to a sensible value. What's more is that this value will likely depend on the amount of tests you have that are making use of vm.assume.
It would be useful to be able to set a maximum reject rate that is applied per test function. Say, if I want the rejection rate to be a maximum of 10%, then this should only apply to the rejection count of each function and not globally discard the whole fuzz campaign.
Perhaps adding this information as natspec could be useful (#4085).
Edit: I see the max test rejects actually apply per function already, still it would be great to specify this in a percentage.
Hmm, I'm hesitant about overcomplicating this flag—if you change the number of fuzz runs by changing your profile, you can also update the max number of rejects in that profile so the two are always in sync. So this doesn't seem to add too much value
Personally, I'd still find it helpful. Though, if no one else sees the need, then we can close this for now, as it's not high-priority.
I am with @0xPhaze, I would also find this feature useful.
Related: #4085.