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

cmd/go: when -timeout is the default (10m), pass a nonzero -test.timeout to tests #28147

Closed
bcmills opened this issue Oct 11, 2018 · 2 comments
Closed
Labels
FrozenDueToAge GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Oct 11, 2018

In https://go-review.googlesource.com/c/go/+/141218/1/src/cmd/go/go_test.go#133, @ianlancetaylor notes (emphasis mine):

If you run go test, the go tool will pass its -timeout argument to the test program as the -test.timeout flag. But you will only see that when running go test, not when running the test program directly, and you will only see it if you use a -timeout option. The default value of 10 minutes is not passed to the test program by go test. This is arguably a bug. See also #14780.

The fact that -test.timeout is not passed for the default 10m timeout makes it difficult for the test to fail cleanly if that timeout is reached (see also #28135).

@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 11, 2018
@bcmills bcmills added this to the Go1.12 milestone Oct 11, 2018
@bcmills bcmills self-assigned this Oct 11, 2018
@bcmills bcmills added the GoCommand cmd/go label Oct 11, 2018
@bcmills bcmills changed the title cmd/go: when -timeout is the default, pass a nonzero -test.timeout to tests cmd/go: when -timeout is the default (10m), pass a nonzero -test.timeout to tests Oct 11, 2018
@bcmills
Copy link
Contributor Author

bcmills commented Nov 15, 2018

This might make #24774 easier to diagnose.

@andybons andybons modified the milestones: Go1.12, Go1.13 Feb 12, 2019
okamotoyuki added a commit to okamotoyuki/go that referenced this issue Mar 3, 2019
…not given from command line

Make 'go test' command to pass the default timeout (10m) to test programs if the value is not given from command line.

Fixes golang#28147
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/164963 mentions this issue: cmd/go/internal/test: pass default timeout to test programs if not given from command line

okamotoyuki added a commit to okamotoyuki/go that referenced this issue Mar 6, 2019
…t is not given from command line

Make 'go test' command to pass the default timeout (10m) to test programs even if the value is not given from command line.

Fixes golang#28147
okamotoyuki added a commit to okamotoyuki/go that referenced this issue Mar 10, 2019
…t is not given from command line

Make 'go test' command to pass the default timeout (10m) to test programs even if the value is not given from command line.

Fixes golang#28147
@golang golang locked and limited conversation to collaborators Apr 12, 2020
@rsc rsc unassigned bcmills Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
3 participants