-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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, internal/fuzz: Support -c flag #52169
Comments
You need to pass the fuzz flags (like any other test flags) to the built binary, not to the build command. For questions please refer to https://github.com/golang/go/wiki/Questions |
|
./fuzz.test -test.fuzz=Fuzz |
Thank you. That is partially correct. The result of that command alone is:
And as is mentioned on the first line, if we create an empty directory and run Thank you very much for the quick reply, @seankhliao |
When building a native fuzzer with the
-c
flag, a unit test is built.For example, I have a simple fuzzer:
I build it with
go test -fuzz=Fuzz -c
...which gives me the
fuzz.test
executable.Running that executable with
./fuzz.test
prints out:PASS
This may be intended, but it would be highly desirable to offer support for building an executable that can be run with the same flags as
go test -fuzz=Fuzz
.The text was updated successfully, but these errors were encountered: