-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
testing: unclear what t.Skip does in the context of fuzzing #48779
Comments
The docs do say:
Still unclear to me if this means that the input can end up in the cached corpus inside the build cache or not - to my understanding, that would be the difference between go-fuzz's |
cc @golang/fuzzing We should clarify this. Currently We should make sure that if |
So I guess go-fuzz's |
Did you mean Go 1.19 here? Or is this Go 1.18? |
1.19 most likely, though it would be nice to have for 1.18. There are already a lot of open release blockers to fix soon though. |
CC @golang/fuzzing What is the status of this issue? Thanks. |
Calling T.Skip previously had the same effect as returning early from a fuzz test. Now it will signal to the fuzzer that the input should never be considered "interesting" even if it produces new coverage. This is equivalent to "return 1" in go-fuzz. Fixes golang#48779
Calling T.Skip previously had the same effect as returning early from a fuzz test. Now it will signal to the fuzzer that the input should never be considered "interesting" even if it produces new coverage. This is equivalent to "return 1" in go-fuzz. Fixes golang#48779
Calling T.Skip previously had the same effect as returning early from a fuzz test. Now it will signal to the fuzzer that the input should never be considered "interesting" even if it produces new coverage. This is equivalent to "return 1" in go-fuzz. Fixes golang#48779
Change https://go.dev/cl/430676 mentions this issue: |
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 1
is now a regular return ending the function, andreturn 0
is now at.Skip
to signal an uninteresting input. Here's an example: mvdan/sh@e186e04I'd love it if the meaning of
t.Skip
in the context of fuzz funcs was better documented. Perhaps my understanding of what it does is incorrect, or perhaps it doesn't correspond toreturn 0
in 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.cc @katiehockman
The text was updated successfully, but these errors were encountered: