From c0402741c963c6f4ffd4911d09a78d7497ade070 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Wed, 6 Nov 2024 15:40:35 -0800 Subject: [PATCH] fix: greater gap for fuzz test seconds vs timeout --- tools/bin/go_core_fuzz | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/bin/go_core_fuzz b/tools/bin/go_core_fuzz index ee48b05f93e..f5ae76c1ca7 100755 --- a/tools/bin/go_core_fuzz +++ b/tools/bin/go_core_fuzz @@ -7,17 +7,16 @@ OUTPUT_FILE=${OUTPUT_FILE:-"./output.txt"} FUZZ_TIMEOUT_MINUTES=${FUZZ_TIMEOUT_MINUTES:-"6"} TOTAL_SECONDS=$((FUZZ_TIMEOUT_MINUTES * 60)) -if (( TOTAL_SECONDS > 60 )); then - FUZZ_SECONDS=$((TOTAL_SECONDS - 60)) +if (( TOTAL_SECONDS > 120 )); then + # Allow for a 90 second buffer between the timeout, and fuzz test runtime + FUZZ_SECONDS=$((TOTAL_SECONDS - 90)) else - FUZZ_SECONDS=$TOTAL_SECONDS + echo "Increase FUZZ_TIMEOUT_MINUTES to >=2, received $FUZZ_TIMEOUT_MINUTES" + exit 1 fi echo "Failed fuzz tests and panics: ---------------------" echo "" -# the amount of --seconds here is subject to change based on how long the CI job takes in the future -# as we add more fuzz tests, we should take into consideration increasing this timelapse, so we can have enough coverage. -# We are timing out after ~10mins in case the tests hang. (Current CI duration is ~8m, modify if needed) timeout "${FUZZ_TIMEOUT_MINUTES}"m ./fuzz/fuzz_all_native.py --ci --seconds "$FUZZ_SECONDS" --go_module_root ./ | tee $OUTPUT_FILE EXITCODE=${PIPESTATUS[0]}