Skip to content

eBPF-based security platform

testing: keep the status of a fuzz target that fails

Daniel Borkmann9c5b30e5a765
diff --git a/testing/fuzz/run.sh b/testing/fuzz/run.sh
index d6e6979b..34d444a5 100755
--- a/testing/fuzz/run.sh
+++ b/testing/fuzz/run.sh
@@ -25,11 +25,12 @@ work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
run() {
+ status=0
mkdir -p "$work/$1"
./fuzz-"$1" -max_total_time="$seconds" -timeout=10 \
-rss_limit_mb=2048 -artifact_prefix="$PWD/crash-$1-" \
- "$work/$1" "corpus/$1" >"$work/$1.log" 2>&1
- echo $? >"$work/$1.rc"
+ "$work/$1" "corpus/$1" >"$work/$1.log" 2>&1 || status=$?
+ echo $status >"$work/$1.rc"
}
# FUZZ_JOBS targets at a time, one per CPU unless told otherwise.