cargo-fuzz
cargo-fuzz copied to clipboard
Should create corpus directory with the creation of fuzz directory
Not exactly. cargo fuzz --init
is something you run once, check in, and no other contributor runs again. Since the directory is gitignored, it can't be checked in. This is why we do this at fuzz-time.
We could still create it at init time, but we should also create it at fuzz time.
There’s a caveat then. Half of the point of the corpus directory is to add starting sample data, for fuzzer to use, not only to save intermediate results.
In that sense, to provide any starting data, you have to create the directory yourself. For that same reason we should also be using per-fuzz-target-script corpuses, but that’s a different issue.
Yeah. So we should create it in both fuzz and init.