Skip to content
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

Merged
merged 2 commits into from
Oct 2, 2020
Merged

setup fuzzing #98

merged 2 commits into from
Oct 2, 2020

Conversation

ksurent
Copy link
Contributor

@ksurent ksurent commented Oct 1, 2020

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

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
@ksurent
Copy link
Contributor Author

ksurent commented Oct 1, 2020

Fixes #24.

@ksurent
Copy link
Contributor Author

ksurent commented Oct 1, 2020

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.

@ksurent ksurent mentioned this pull request Oct 2, 2020
@grzkv grzkv self-requested a review October 2, 2020 07:50
Copy link
Member

@grzkv grzkv left a 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.

.gitignore Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
@grzkv
Copy link
Member

grzkv commented Oct 2, 2020

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.

@ksurent Yes, we plan to update around now. Thanks for pointing this out!

@ksurent ksurent requested a review from grzkv October 2, 2020 09:08
Copy link
Member

@grzkv grzkv left a 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.

@grzkv grzkv merged commit a073bab into bookingcom:master Oct 2, 2020
@@ -0,0 +1,20 @@
package rec
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants