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

Open
bcmills opened this Issue Oct 11, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@bcmills
Member

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 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 label Oct 11, 2018

@bcmills bcmills changed the title from cmd/go: when -timeout is the default, pass a nonzero -test.timeout to tests to cmd/go: when -timeout is the default (10m), pass a nonzero -test.timeout to tests Oct 11, 2018

@bcmills

This comment has been minimized.

Member

bcmills commented Nov 15, 2018

This might make #24774 easier to diagnose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment