Files
tailscale/cmd
Avery Pennarun 62644cb97b cmd/deflake: add tool for detecting flaky tests
Deflake is a tool that runs tests repeatedly to identify flaky tests.
It integrates with the existing test infrastructure to:

- Run tests with configurable iteration count (-count flag)
- Detect tests that pass inconsistently
- Handle race detector testing (-race flag)
- Skip Example tests (Go runs them exactly once regardless of -count)
- Use isolated TMPDIR per run to prevent /tmp exhaustion
- Clean up old Test* directories from crashed tests
- Set proper timeout hierarchy (go test -timeout > context timeout)

Usage:
  go build ./cmd/deflake
  ./deflake -packages=./... -count=10
  ./deflake -packages=./tstest/integration -count=20 -race

Change-Id: I4a36314e92197feb8f860a6e2c0b5b0202ce2915
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
2026-04-13 17:28:12 +02:00
..