Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: lower time for fuzz/race tests #15141

Merged
merged 13 commits into from
Nov 8, 2024
Prev Previous commit
Next Next commit
Adjust fuzzing runtime
  • Loading branch information
erikburt committed Nov 7, 2024
commit ab1e45271e8825367f45dca2a3c569cf7678846d
7 changes: 5 additions & 2 deletions fuzz/fuzz_all_native.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ def main():
durations_seconds = [60] if os.getenv('GITHUB_EVENT_NAME') == 'scheduled' else [45]
if args.seconds:
# However, if seconds was specified, evenly divide total time among all fuzzers
# leaving a 5 second buffer for processing/building time between fuzz runs
actual_fuzz_time = total_time - (num_fuzzers * 5)
# leaving a 10 second buffer for processing/building time between fuzz runs
actual_fuzz_time = total_time - (num_fuzzers * 10)
if actual_fuzz_time <= 5 * num_fuzzers:
print(f"Seconds (--seconds {arg.seconds}) is too low to properly run fuzzers for 5sec each. Exiting.")
exit(1)
durations_seconds = [ actual_fuzz_time / num_fuzzers ]

for duration_seconds in durations_seconds:
Expand Down
4 changes: 2 additions & 2 deletions tools/bin/go_core_fuzz
erikburt marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ FUZZ_TIMEOUT_MINUTES=${FUZZ_TIMEOUT_MINUTES:-"5"}

TOTAL_SECONDS=$((FUZZ_TIMEOUT_MINUTES * 60))
if (( TOTAL_SECONDS >= 120 )); then
# Allow for a 60 second buffer between the timeout, and fuzz test runtime
FUZZ_SECONDS=$((TOTAL_SECONDS - 60))
# Allow for a 30 second buffer between the timeout, and fuzz test runtime
FUZZ_SECONDS=$((TOTAL_SECONDS - 30))
else
echo "Increase FUZZ_TIMEOUT_MINUTES to >=2, received $FUZZ_TIMEOUT_MINUTES"
exit 1
Expand Down
Loading