diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-03-05 14:21:30 +0100 |
---|---|---|
committer | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2022-03-19 00:53:18 +0100 |
commit | c71e41e9d9e24fd433e92732cc4253d3f9d67b80 (patch) | |
tree | 2eb7b1b9ae0f5551960287c03bdfd7e2ba46487e /fuzz | |
parent | ff481b590b434112398f62169e570f70232a83eb (diff) | |
download | qpdf-c71e41e9d9e24fd433e92732cc4253d3f9d67b80.tar.zst |
Change handling of qpdf fuzz corpus
Files are copied into the build area rather than left in the source
tree, and the test suite looks for them there. Also remove special
case around counting files in the qpdf corpus.
Diffstat (limited to 'fuzz')
-rw-r--r-- | fuzz/qtest/fuzz.test | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fuzz/qtest/fuzz.test b/fuzz/qtest/fuzz.test index ad3e448f..d234ce79 100644 --- a/fuzz/qtest/fuzz.test +++ b/fuzz/qtest/fuzz.test @@ -9,10 +9,7 @@ require TestDriver; my $td = new TestDriver('fuzz'); -my $qpdf_n_test_files = 31; -my @extra = glob("../qpdf_extra/*.fuzz"); -my $qpdf_n_extra_files = scalar(@extra); -my $qpdf_n_files = ($qpdf_n_test_files + $qpdf_n_extra_files); +my $qpdf_corpus = $ENV{'QPDF_FUZZ_CORPUS'} || die "must set QPDF_FUZZ_CORPUS"; my @fuzzers = ( ['ascii85' => 1], @@ -23,7 +20,7 @@ my @fuzzers = ( ['pngpredictor' => 1], ['runlength' => 6], ['tiffpredictor' => 1], - ['qpdf' => $qpdf_n_files], + ['qpdf' => 52], # increment when adding new files ); my $n_tests = 0; @@ -40,7 +37,7 @@ foreach my $d (@fuzzers) my $dir = "../${k}_fuzzer_seed_corpus"; if (! -d $dir) { - $dir = "../build/${k}_fuzzer_seed_corpus"; + $dir = $qpdf_corpus; } my @files = glob("$dir/*"); $td->runtest("file count for $dir", |