From c71e41e9d9e24fd433e92732cc4253d3f9d67b80 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 5 Mar 2022 08:21:30 -0500 Subject: 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. --- fuzz/qtest/fuzz.test | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'fuzz') 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", -- cgit v1.2.3-54-g00ecf