mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 18:23:32 +08:00
ci: merge seed corpora with public OSS-Fuzz corpora on CFLite
to let it cover as much code as possible. It should help to catch most regressions in a few minutes.
This commit is contained in:
parent
e46c743a57
commit
69aa4982bc
@ -1,4 +1,5 @@
|
|||||||
FROM gcr.io/oss-fuzz-base/base-builder@sha256:14b332de0e18683f37386eaedbf735bc6e8d81f9c0e1138d620f2178e20cd30a
|
FROM gcr.io/oss-fuzz-base/base-builder@sha256:14b332de0e18683f37386eaedbf735bc6e8d81f9c0e1138d620f2178e20cd30a
|
||||||
|
ENV MERGE_WITH_OSS_FUZZ_CORPORA=yes
|
||||||
COPY . $SRC/systemd
|
COPY . $SRC/systemd
|
||||||
WORKDIR $SRC/systemd
|
WORKDIR $SRC/systemd
|
||||||
COPY tools/oss-fuzz.sh $SRC/build.sh
|
COPY tools/oss-fuzz.sh $SRC/build.sh
|
||||||
|
@ -35,7 +35,7 @@ else
|
|||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y gperf m4 gettext python3-pip \
|
apt-get install -y gperf m4 gettext python3-pip \
|
||||||
libcap-dev libmount-dev libkmod-dev \
|
libcap-dev libmount-dev libkmod-dev \
|
||||||
pkg-config wget python3-jinja2
|
pkg-config wget python3-jinja2 zipmerge
|
||||||
|
|
||||||
# gnu-efi is installed here to enable -Dgnu-efi behind which fuzz-bcd
|
# gnu-efi is installed here to enable -Dgnu-efi behind which fuzz-bcd
|
||||||
# is hidden. It isn't linked against efi. It doesn't
|
# is hidden. It isn't linked against efi. It doesn't
|
||||||
@ -98,3 +98,15 @@ wget -O "$OUT/fuzz-json.dict" https://raw.githubusercontent.com/rc0r/afl-fuzz/ma
|
|||||||
find "$build" -maxdepth 1 -type f -executable -name "fuzz-*" -exec mv {} "$OUT" \;
|
find "$build" -maxdepth 1 -type f -executable -name "fuzz-*" -exec mv {} "$OUT" \;
|
||||||
find src -type f -name "fuzz-*.dict" -exec cp {} "$OUT" \;
|
find src -type f -name "fuzz-*.dict" -exec cp {} "$OUT" \;
|
||||||
cp src/fuzz/*.options "$OUT"
|
cp src/fuzz/*.options "$OUT"
|
||||||
|
|
||||||
|
if [[ "$MERGE_WITH_OSS_FUZZ_CORPORA" == "yes" ]]; then
|
||||||
|
for f in "$OUT/"fuzz-*; do
|
||||||
|
[[ -x "$f" ]] || continue
|
||||||
|
fuzzer=$(basename "$f")
|
||||||
|
t=$(mktemp)
|
||||||
|
if wget -O "$t" "https://storage.googleapis.com/systemd-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/systemd_${fuzzer}/public.zip"; then
|
||||||
|
zipmerge "$OUT/${fuzzer}_seed_corpus.zip" "$t"
|
||||||
|
fi
|
||||||
|
rm -rf "$t"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user