From: Sam Thanawalla Date: Mon, 10 Feb 2025 21:06:02 +0000 (+0000) Subject: cmd/go: do not apply kill timeout to go test with -bench X-Git-Tag: go1.25rc1~1046 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=769274bf14f318f186ae1f89fd0fccb18241aaee;p=gostls13.git cmd/go: do not apply kill timeout to go test with -bench The testing package already does this. go test should do the same thing. Fixes: #69181 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest Change-Id: I942bd09c5832b48d498a2eb1f1500e1d294d0a2c Reviewed-on: https://go-review.googlesource.com/c/go/+/648236 LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Matloob --- diff --git a/src/cmd/go/internal/test/test.go b/src/cmd/go/internal/test/test.go index 28ab6a0935..2ee2aa6f41 100644 --- a/src/cmd/go/internal/test/test.go +++ b/src/cmd/go/internal/test/test.go @@ -802,9 +802,9 @@ func runTest(ctx context.Context, cmd *base.Command, args []string) { // to that timeout plus one minute. This is a backup alarm in case // the test wedges with a goroutine spinning and its background // timer does not get a chance to fire. - // Don't set this if fuzzing, since it should be able to run + // Don't set this if fuzzing or benchmarking, since it should be able to run // indefinitely. - if testTimeout > 0 && testFuzz == "" { + if testTimeout > 0 && testFuzz == "" && testBench == "" { // The WaitDelay for the test process depends on both the OS I/O and // scheduling overhead and the amount of I/O generated by the test just // before it exits. We set the minimum at 5 seconds to account for the OS