-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: -test.timeout=0 does not cancel go tool's test timeout #18490
Comments
This happens even without using |
In general |
On my phone at the moment but Line 249 in 4bf7d1e
go test -help maybe?)
|
Thanks. There is the timeout flag used by the testing package, and the timeout flag used by the go tool. The go tool passes its timeout flag to the testing package, so they seem like the same thing. But the go tool uses its timeout flag as a backup for the testing package timeout flag, and the go tool ignores a zero timeout rather than treating it as canceling the timeout. We should fix that. |
This is a dup of #14780 |
So it is. Closing. Thanks. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go 1.8beta2 ( go version devel +9cd3c0662a Thu Dec 15 20:06:07 2016 +0000 linux/amd64 )
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/dgryski/work/src/cvs/gocode:/home/dgryski/Dropbox/GITS/gocode/"
GORACE=""
GOROOT="/home/dgryski/work/src/cvs/go"
GOTOOLDIR="/home/dgryski/work/src/cvs/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build687665754=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
Running a benchmark with a number of sub-benchmarks and -count=20, my benchmarks were killed even though I provided
-test.timeout=0
.I had a small (but slow, without updating the 10m timeout in the source code):
Source code here: https://play.golang.org/p/ubgEcN__zD
What did you expect to see?
The timeout was ignored and my long-running benchmarks completed.
What did you see instead?
Killed :(
The text was updated successfully, but these errors were encountered: