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
Now that consume is closer to being a reality, we should explore the idea of making the test set fuzzable by defining a pytest marker that can be added to a test to mark some of its parameters or fixtures as fuzzable.
In the case of fuzzable parameters we could have the following:
Which specifies that the test can be converted to a fuzz test and the inputs dest, src and length can be randomized.
By default, the fuzzer should try to fuzz int values from 0 - 2**256-1 but it should be possible to add a typing.Annotated that perhaps contains a function which produces the random value.
It might be possible to also add fixture names to the parameter string passed to the marker, but I'm not entirely sure if it would be possible to extract the correct annotations from the fixture function definition.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Now that
consume
is closer to being a reality, we should explore the idea of making the test set fuzzable by defining a pytest marker that can be added to a test to mark some of its parameters or fixtures as fuzzable.In the case of fuzzable parameters we could have the following:
Which specifies that the test can be converted to a fuzz test and the inputs
dest
,src
andlength
can be randomized.By default, the fuzzer should try to fuzz
int
values from0 - 2**256-1
but it should be possible to add atyping.Annotated
that perhaps contains a function which produces the random value.It might be possible to also add fixture names to the parameter string passed to the marker, but I'm not entirely sure if it would be possible to extract the correct annotations from the fixture function definition.
Beta Was this translation helpful? Give feedback.
All reactions