A simplistic utility to dump the contents of a Go generated fuzz test corpus.
I was curious whether I could use fuzzing to improve the coverage of my existing tests by discovering more "interesting" inputs. But the format of how a fuzz corpus is cached by Go (a single separate file for every unique argument set) felt a bit unwieldy to be reviewed.
I tried looking for a ready-made solution that would fit the bill for me, but couldn't find any. So I wrote this.
See the reference docs for details.
go install github.com/antichris/go-fuzzdump/cmd/fuzzdump@latestThe fuzzdump command takes a fuzzing corpus directory path as an argument and dumps the corpus entries it finds there to the standard output.
$ fuzzdump ./fuzz/FuzzMyFunc
{{
string("foo"),
uint(8),
}, {
string("bar"),
uint(13),
}, {
string("qux"),
uint(21),
}}| Code | Description |
|---|---|
| 0 | Success |
| 1 | Some files were invalid, but others could be dumped |
| 2 | No valid corpus files were found |
| 3 | Another critical error occurred |
The source code of this project is released under Mozilla Public License Version 2.0. See LICENSE.