Skip to content

Commit f21f209

Browse files
oetrMarcono1234fmeum
committed
docs: fix bad corpus path; add a .gitattributes entry example
Co-authored-by: Marcono1234 <[email protected]> Co-authored-by: Fabian Meumertzheim <[email protected]>
1 parent db89429 commit f21f209

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,20 +175,28 @@ If you see an error saying that `libjvm.so` has not been found, make sure that `
175175

176176
## Directories and files
177177

178-
Jazzer uses two directories to store inputs: the *generated corpus directory* and the *inputs directory*.
178+
Jazzer uses two main directories to store inputs: the *generated corpus directory* and the *inputs directory*.
179+
180+
> [!IMPORTANT]
181+
> If you are using Git and want to add the corpus directories to the repository, mark them as `binary` in your `.gitattributes` file:
182+
>
183+
> ```gitattributes
184+
> src/test/resources/** binary
185+
> .cifuzz-corpus/** binary
186+
> ```
179187
180188
### Generated corpus directory
181189
182190
The *generated corpus directory* is where Jazzer saves inputs that generate new coverage during fuzzing.
183191
It is located in `.cifuzz-corpus/<package>/<FuzzTestClass>/<fuzzTestMethod>`, where `<package>`, `<FuzzTestClass>`, and `<fuzzTestMethod>` correspond to the package name, class name, and method name of the fuzz test, respectively.
184-
For example, if the fuzz test is in the class `src/test/java/com/example/ValidFuzzTestsInputs.java`, method `byteFuzz`, the corpus directory is located in `.cifuzz-corpus/com.example.ValidFuzzTestsInputs/byteFuzz`.
192+
For example, if the fuzz test is in the class `src/test/java/com/example/ValidFuzzTests.java`, method `byteFuzz`, the corpus directory is located in `.cifuzz-corpus/com.example.ValidFuzzTests/byteFuzz`.
185193
186194
187195
### Inputs directory
188196
189197
Any input that triggers a crash during fuzzing is saved to the *inputs directory*.
190198
This directory is derived from the package and class name of the fuzz test.
191-
For example, if the fuzz test is in the class `src/test/java/com/example/ValidFuzzTestsInputs.java`, method `byteFuzz`, the *inputs directory* is located in `src/test/resources/com/example/ValidFuzzTestsInputs/byteFuzz`.
199+
For example, if the fuzz test is in the class `src/test/java/com/example/ValidFuzzTests.java`, method `byteFuzz`, the *inputs directory* is located in `src/test/resources/com/example/ValidFuzzTestsInputs/byteFuzz`.
192200
If this directory does not exist, Jazzer will save crash inputs in the directory from which the tests are executed.
193201
194202

0 commit comments

Comments
 (0)