You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, any run that does not result in parse_input returning Ok is useless, as the goal of this fuzzer is not semantically to fuzz parse_input (which may be ad-hoc for this fuzzer).
In turn, I'm thinking it might make sense to add a way to report to cargo-bolero that the input was actually (un)interesting, so that it could report stats (eg. "60% of all runs were uninteresting, consider improving parse_int to increase the proportion of valid inputs").
Or even, having the API ending up as something like:
And then bolero when run in cargo-test mode would run for 1000 times and assert that at least 600 of the runs hit the interesting.is_interesting() line.
This would be bells and whistles, so definitely not essential, but WDYT about it?
The text was updated successfully, but these errors were encountered:
Yeah that would be really nice to have. Although I'd have to think about the API a bit.
One thing to note is you could implement your parse_input function as a ValueGenerator, which has the ability to reject generated values by returning None. At that point, all we would need is for bolero to report on the ratio of Some to None.
Maybe it'd make sense to have a .preprocess_input(Fn(T) -> Option<U>) on the builder, that'd hide the creation of the ValueGenerator?
With this setup, bolero reporting the ratio of Some to None would be enough indeed I think :)
Assume a fuzzer that looks like:
Basically, any run that does not result in
parse_input
returningOk
is useless, as the goal of this fuzzer is not semantically to fuzzparse_input
(which may be ad-hoc for this fuzzer).In turn, I'm thinking it might make sense to add a way to report to cargo-bolero that the input was actually (un)interesting, so that it could report stats (eg. "60% of all runs were uninteresting, consider improving parse_int to increase the proportion of valid inputs").
Or even, having the API ending up as something like:
And then bolero when run in
cargo-test
mode would run for 1000 times and assert that at least 600 of the runs hit theinteresting.is_interesting()
line.This would be bells and whistles, so definitely not essential, but WDYT about it?
The text was updated successfully, but these errors were encountered: