Closed br-lewis closed 1 year ago
Something to note here is that this change could be considered breaking in that previously generated corpora will not be used by in fuzzing mode. They will still be used as test cases in regression mode but fuzzing will start from scratch unless the test cases are copied/symlinked into the new test-specific directories.
This changes jazzer to create and look for crash files in different directories for each tested method. It adds a new
<test name>
directory to the searchedresources/<classpath>/<class name>Inputs
and.cifuzz-corpus/<class name>/<test name>
paths so each test has its own separated crash files.Now inputs are gathered from:
resources/<classpath>/<class name>Inputs
resources/<classpath>/<class name>Inputs/<test name>
Classes can share common test cases between tests while allowing each test to have its own individual inputs. The inputs under
.cifuzz-corpus
do not have this shared vs non-shared inputs behavior because libfuzzer doesn't support that.I also wrote up some docs on how jazzer works with junit which could use a look over since there are some parts that I'm not sure about it which should be clear in the text. I'm also not sure if it should be in a separate markdown file or as part of the
FuzzTest
javadoc comment.