/ go Public
testing: unclear what t.Skip does in the context of fuzzing #48779
Issues related to native fuzzing support
Feedback is required from experts, contributors, and/or the community before a change can be made.
The current "first class fuzzing" proposal design doc (https://go.googlesource.com/proposal/+/master/design/draft-fuzzing.md) only has one mention of "skip":
As I was porting one of my fuzz funcs from go-fuzz to first class fuzzing, I remembered that go-fuzz actually has two kinds of "skips":
So it seems like, with go-fuzz, you have three options: give priority (+1), must ignore (-1), or default behavior (0).
Personally, I only used +1 or 0 in my go-fuzz funcs; I never had any input that must never be added to the corpus. I've adapted those returns for the new fuzzer so that the
return 1is now a regular return ending the function, and
return 0is now a
t.Skipto signal an uninteresting input. Here's an example: mvdan/sh@e186e04
I'd love it if the meaning of
t.Skipin the context of fuzz funcs was better documented. Perhaps my understanding of what it does is incorrect, or perhaps it doesn't correspond to
return 0in go-fuzz.
Another question is whether we want an equivalent to go-fuzz's
return -1. I personally didn't have a need for it, but others might be using it and not know how to transition those to the new fuzzer.
The text was updated successfully, but these errors were encountered: