Skip to content

Commit e88eb4c

Browse files
committed
fuzz: scale iteration count with corpus size
Instead of a fixed 30s run_time, set iterations to 3x corpus size plus a baseline of 1000. This ensures the full corpus is always replayed with room for new mutations, while small targets finish quickly. A 5 minute hard cap prevents any single target from running too long. AI tools were used in preparing this commit.
1 parent 1026866 commit e88eb4c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fuzz/ci-fuzz.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ for TARGET in src/bin/*.rs; do
3636
CORPUS_DIR="hfuzz_workspace/$FILE/input"
3737
CORPUS_COUNT=$(find "$CORPUS_DIR" -type f 2>/dev/null | wc -l)
3838
echo "Fuzzing $FILE (corpus: $CORPUS_COUNT files)"
39-
HFUZZ_RUN_ARGS="--exit_upon_crash -n8 --run_time 30"
39+
ITERATIONS=$((CORPUS_COUNT * 3 + 1000))
40+
HFUZZ_RUN_ARGS="--exit_upon_crash -n8 -N $ITERATIONS --run_time 300"
4041
if [ "$FILE" = "chanmon_consistency_target" -o "$FILE" = "fs_store_target" ]; then
4142
HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -F 64"
4243
fi

0 commit comments

Comments
 (0)