From: Evgeny Vereshchagin Date: Wed, 29 Jul 2020 07:22:41 +0000 (+0000) Subject: tests: pack testcases into zip archives X-Git-Tag: v2.37-rc1~527^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6e277b7a97f791b6fe491a1a870069fc9013ef7f;p=thirdparty%2Futil-linux.git tests: pack testcases into zip archives so that OSS-Fuzz can use them as seed corpora Signed-off-by: Evgeny Vereshchagin --- diff --git a/tools/oss-fuzz.sh b/tools/oss-fuzz.sh index 23b10fbd4a..f3a61d0dcf 100755 --- a/tools/oss-fuzz.sh +++ b/tools/oss-fuzz.sh @@ -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 \;