-
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: document file format for fuzz corpus files #48717
Comments
I'm also interested in this for a slightly different reason. Imagine I change my fuzzer to add an extra input parameter: presumably all existing fuzz corpus files won't work out of the box anymore, as the number of inputs mismatches. It would be nice to be able to write a small program (or use a tool) to rewrite the corpus files accordingly, e.g. by setting the new input parameter to its default value. |
You're in luck! @rolandshoemaker already built a tool for this: https://github.com/golang/tools/tree/master/cmd/file2fuzz /cc @golang/fuzzing |
@katiehockman Thanks! I actually built a little tool myself, but after doing that, I speculated somewhat on what a more general tool might look like. This is what I came up with:
ISTM it might be useful to add something like this to the |
Change https://golang.org/cl/372434 mentions this issue: |
For golang/go#48255 Fixes golang/go#48717 Change-Id: Ie87c09b9e031a2221ca77d33c4e8140d787a33d2 Reviewed-on: https://go-review.googlesource.com/c/website/+/372434 Run-TryBot: DO NOT USE <katiehockman@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Julie Qiu <julieqiu@google.com> Trust: DO NOT USE <katiehockman@google.com>
commit 8ac5cbe
The fuzz docs inside the testing package say:
but the docs don't say what format those files are expected to be in. I was expecting to be able to just copy a load of corpus data from the original fuzz tool (where the format is just exactly the data for the input), but I see errors of the form:
The testing docs should say what format should be used for these files. Ideally there would be a some kind of migration tool to migrate from the old format to the new.
The text was updated successfully, but these errors were encountered: