-
Notifications
You must be signed in to change notification settings - Fork 12
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
setup fuzzing #98
setup fuzzing #98
Conversation
this commit adds basic support for https://github.com/dvyukov/go-fuzz the only package that's currently being fuzzed is ./pkg/rec several things worth mentioning: I added go-fuzz to go.mod because go-fuzz-build puts it there every time it's invoked (i.e. it adds uncommitted changes to go.mod) to add a tool dependency, I followed the technique described in https://github.com/go-modules-by-example/index/blob/master/010_tools/README.md I added a separate make target for fuzzing, but I also made it a part of `make check` with the intention of making it a part of the release process
Fixes #24. |
Note that go-fuzz is currently broken in some cases with Go 1.15. See dvyukov/go-fuzz#294 and golang/go#40546. This may come up if you're planning to update to 1.15 soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ksurent Thanks for the PR! I have a couple of minor comments, but nothing major.
@ksurent Yes, we plan to update around now. Thanks for pointing this out! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ksurent Awesome! Thanks a lot for the contribution.
@@ -0,0 +1,20 @@ | |||
package rec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// +build gofuzz
Then this function isn't part of the regular public API.
this commit adds basic support for https://github.com/dvyukov/go-fuzz
the only package that's currently being fuzzed is ./pkg/rec
several things worth mentioning:
I added go-fuzz to go.mod because go-fuzz-build puts it there every time it's invoked (i.e.
it adds uncommitted changes to go.mod)
to add a tool dependency, I followed the technique described in
https://github.com/go-modules-by-example/index/blob/master/010_tools/README.md
I added a separate make target for fuzzing, but I also made it a part of
make check
with the intention of making it a part of the release process