run_fuzz_15m.sh 1.3 KB

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env bash
  2. # 15-minute fuzz for each required target. Exit 0 only if every target PASS.
  3. set -euo pipefail
  4. ROOT="$(cd "$(dirname "$0")/.." && pwd)"
  5. cd "$ROOT"
  6. export PATH="/data/prod2u/opt/go1.25.13/bin:/opt/python-3.12/bin:/usr/bin:/bin:${PATH}"
  7. export GOTOOLCHAIN="${GOTOOLCHAIN:-local}"
  8. export GOROOT="${GOROOT:-/data/prod2u/opt/go1.25.13}"
  9. SEC="${HTH_FUZZ_SECONDS:-900}"
  10. fail=0
  11. run_one() {
  12. local name="$1"
  13. shift
  14. echo "=== ${name} fuzztime=${SEC}s ==="
  15. if ! "$@"; then
  16. echo "FAIL ${name}"
  17. fail=1
  18. fi
  19. }
  20. run_one fuzz-parser go test ./internal/protocol -fuzz=FuzzParser -fuzztime="${SEC}s"
  21. run_one fuzz-profile go test ./internal/profile -fuzz=FuzzLoadStrict -fuzztime="${SEC}s"
  22. run_one fuzz-config go test ./internal/config -fuzz=FuzzLoadYAML -fuzztime="${SEC}s"
  23. run_one fuzz-assemble go test ./internal/safety -fuzz=FuzzAssemble -fuzztime="${SEC}s"
  24. run_one fuzz-telemetry go test ./internal/telemetry -fuzz=FuzzResumeIDs -fuzztime="${SEC}s"
  25. run_one fuzz-capture go test ./internal/capture -fuzz=FuzzReadRecords -fuzztime="${SEC}s"
  26. run_one fuzz-replay go test ./internal/backend -fuzz=FuzzReplayOpen -fuzztime="${SEC}s"
  27. run_one fuzz-sdk-descriptor env HTH_FUZZ_SECONDS="${SEC}" python3.12 -m pytest -q sdk/python/tests/test_descriptor_fuzz.py
  28. exit "${fail}"