From 8015c015d47adfd84eab0c3aee0f17927eb1773e Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 27 Oct 2025 21:32:57 +0000 Subject: [PATCH] Use `honggfuzz`'s `--run-time` arg to limit per-fuzz runtime in CI We have some complexity in `ci-fuzz.sh` to limit each fuzzer to a rough runtime, but `honggfuzz` has a `--run-time` argument that we can simply use instead, which we do here. --- fuzz/ci-fuzz.sh | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/fuzz/ci-fuzz.sh b/fuzz/ci-fuzz.sh index d1274d751a8..d57a5ad78fa 100755 --- a/fuzz/ci-fuzz.sh +++ b/fuzz/ci-fuzz.sh @@ -33,17 +33,9 @@ cargo --color always hfuzz build -j8 for TARGET in src/bin/*.rs; do FILENAME=$(basename $TARGET) FILE="${FILENAME%.*}" - HFUZZ_RUN_ARGS="--exit_upon_crash -v -n8" - if [ "$FILE" = "chanmon_consistency_target" ]; then - HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -F 64 -N1000" - elif [ "$FILE" = "process_network_graph_target" -o "$FILE" = "full_stack_target" -o "$FILE" = "router_target" -o "$FILE" = "lsps_message_target" ]; then - HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -N10000" - elif [ "$FILE" = "indexedmap_target" ]; then - HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -N100000" - elif [ "$FILE" = "fs_store_target" ]; then - HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -F 64 -N10000" - else - HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -N1000000" + HFUZZ_RUN_ARGS="--exit_upon_crash -v -n8 --run_time 30" + if [ "$FILE" = "chanmon_consistency_target" -o "$FILE" = "fs_store_target" ]; then + HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -F 64" fi export HFUZZ_RUN_ARGS cargo --color always hfuzz run $FILE