diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 2fdb2483890..88dc1693d65 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -226,7 +226,7 @@ jobs: run: | echo "TIMEOUT=10m" >> $GITHUB_ENV echo "COUNT=50" >> $GITHUB_ENV - echo "FUZZ_SECONDS=500">> $GITHUB_ENV + echo "FUZZ_TIMEOUT_MINUTES=10">> $GITHUB_ENV - name: Install gotestloghelper if: ${{ needs.filter.outputs.should-run-ci-core == 'true' }} diff --git a/tools/bin/go_core_fuzz b/tools/bin/go_core_fuzz index 7cf7a4ddbc0..ee48b05f93e 100755 --- a/tools/bin/go_core_fuzz +++ b/tools/bin/go_core_fuzz @@ -4,15 +4,21 @@ set +e SCRIPT_PATH=`dirname "$0"`; SCRIPT_PATH=`eval "cd \"$SCRIPT_PATH\" && pwd"` OUTPUT_FILE=${OUTPUT_FILE:-"./output.txt"} -FUZZ_TIMEOUT=${FUZZ_TIMEOUT:-10m} -FUZZ_SECONDS=${FUZZ_SECONDS:-"300"} +FUZZ_TIMEOUT_MINUTES=${FUZZ_TIMEOUT_MINUTES:-"6"} + +TOTAL_SECONDS=$((FUZZ_TIMEOUT_MINUTES * 60)) +if (( TOTAL_SECONDS > 60 )); then + FUZZ_SECONDS=$((TOTAL_SECONDS - 60)) +else + FUZZ_SECONDS=$TOTAL_SECONDS +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}" ./fuzz/fuzz_all_native.py --ci --seconds "$FUZZ_SECONDS" --go_module_root ./ | tee $OUTPUT_FILE +timeout "${FUZZ_TIMEOUT_MINUTES}"m ./fuzz/fuzz_all_native.py --ci --seconds "$FUZZ_SECONDS" --go_module_root ./ | tee $OUTPUT_FILE EXITCODE=${PIPESTATUS[0]} # Assert no known sensitive strings present in test logger output