fuzz: Restructure corpora git structure

Use artifacts/ rather than corpus/ to track fuzz inputs. corpus appears
to be a temporary directory that will be modified when minimizing test
cases using commands like `cargo fuzz cmin` or `cargo fuzz tmin`. For
this reason it's not suitable for long-term storage and is likely to
make the git commit-staging process very messy.
This commit is contained in:
y
2023-08-29 16:26:31 -04:00
committed by parazyd
parent ccc46c2d3e
commit 374d19851f
6 changed files with 4 additions and 4 deletions

2
fuzz/.gitignore vendored
View File

@@ -1,4 +1,4 @@
target target
artifacts corpus
coverage coverage
Cargo.lock Cargo.lock

View File

@@ -7,7 +7,7 @@ re-organized as we expand the complexity of the tests
### Motivation ### Motivation
If you discover a crash while fuzzing, add it to the relevant If you discover a crash while fuzzing, add it to the relevant
subdirectory in `corpus/` and give it a meaningful name. subdirectory in `artifacts/` and give it a meaningful name.
Files in the corpora will be used as default inputs in subsequent Files in the corpora will be used as default inputs in subsequent
runs in the fuzzer. The fuzzer will then "mutate" or modify these runs in the fuzzer. The fuzzer will then "mutate" or modify these
@@ -34,6 +34,6 @@ for `cargo fuzz run TARGET`
the fuzzer. The filename's prefix will match the kind of error the fuzzer. The filename's prefix will match the kind of error
encountered: `oom` (out-of-memory), `crash`, etc. encountered: `oom` (out-of-memory), `crash`, etc.
* Choose a `NAME` for the crash file, e.g. `corpus-crash-emptyfile` * Choose a `NAME` for the crash file, e.g. `corpus-crash-emptyfile`
* `cp artifacts/TARGET/CRASH-FILE corpus/TARGET/NAME` * `mv artifacts/TARGET/CRASH-FILE artifacts/TARGET/NAME`
Then add the new `corpus/TARGET/NAME` file to git. Then add the new `artifacts/TARGET/NAME` file to git.