summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2023-01-07 10:27:05 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2023-01-07 17:44:23 +0100
commitbef8d18b3f9776fdb28fc9a4820f9ce9418422f9 (patch)
tree92798c33f75acd65f3079f67ed31951bffac22c8 /tools
parentb7d963e50a0339c9d2d26ba61c6f131856bacf33 (diff)
downloadsystemd-bef8d18b3f9776fdb28fc9a4820f9ce9418422f9.tar.gz
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/oss-fuzz.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/oss-fuzz.sh b/tools/oss-fuzz.sh
index 793411ed84..7e9312b833 100755
--- a/tools/oss-fuzz.sh
+++ b/tools/oss-fuzz.sh
@@ -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