1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-26 17:25:34 +03:00

oss-fuzz: include generated corpora in the final zip file

Since the files with generated directives are now automatically
generated during build, they're now under the respective build directory
which the current oss-fuzz CI script didn't account for.

Follow-up to: #24958
Resolves: #25859
This commit is contained in:
Frantisek Sumsal 2023-01-07 10:27:05 +01:00 committed by Luca Boccassi
parent b7d963e50a
commit bef8d18b3f

View File

@ -97,7 +97,10 @@ rm -rf "$hosts"
# The seed corpus is a separate flat archive for each fuzzer,
# with a fixed name ${fuzzer}_seed_corpus.zip.
for d in test/fuzz/fuzz-*; do
zip -jqr "$OUT/$(basename "$d")_seed_corpus.zip" "$d"
fuzzer="$(basename "$d")"
# Include the build-generated corpora if any as well
readarray -t generated < <(find "$build/test/fuzz" -maxdepth 1 -name "${fuzzer}*" -type f)
zip -jqr "$OUT/${fuzzer}_seed_corpus.zip" "$d" "${generated[@]}"
done
# get fuzz-dns-packet corpus