]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: pack testcases into zip archives
authorEvgeny Vereshchagin <evvers@ya.ru>
Wed, 29 Jul 2020 07:22:41 +0000 (07:22 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Thu, 6 Aug 2020 12:33:11 +0000 (12:33 +0000)
so that OSS-Fuzz can use them as seed corpora

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
tools/oss-fuzz.sh

index 23b10fbd4a1d4245daa5d1e6faeeeb16ff68ec31..f3a61d0dcf2dcfff6ae6cbf2962c2830922879d5 100755 (executable)
@@ -21,5 +21,11 @@ mkdir -p $OUT
 ./configure --disable-all-programs --enable-last --enable-fuzzing-engine --enable-libmount --enable-libblkid
 make -j$(nproc) V=1 check-programs
 
+for d in "$(dirname $0)"/../tests/ts/fuzzers/test_*_fuzz_files; do
+    bd=$(basename "$d")
+    fuzzer=${bd%_files}
+    zip -jqr $OUT/${fuzzer}_seed_corpus.zip "$d"
+done
+
 find . -maxdepth 1 -type f -executable -name "test_*_fuzz" -exec mv {} $OUT \;
 find . -type f -name "fuzz-*.dict" -exec cp {} $OUT \;