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: long tests failing on Windows #25300

Closed
neolit123 opened this issue May 8, 2018 · 10 comments
Closed

cmd/go: long tests failing on Windows #25300

neolit123 opened this issue May 8, 2018 · 10 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Windows Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@neolit123
Copy link
Contributor

neolit123 commented May 8, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version devel +e0adc35c Tue May 8 21:15:48 2018 +0000 windows/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

>go env

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Lubo\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\Lubo\go
set GORACE=
set GOROOT=c:\dev\go
set GOTMPDIR=
set GOTOOLDIR=c:\dev\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Windows\T
EMP\go-build598151490=/tmp/go-build -gno-record-gcc-switches

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

> go test cmd/go -v

cmd/go passes when doing:

src/all.cmd

or:

go test -short -v cmd/go

What did you expect to see?

passing tests for cmd/go.

What did you see instead?

https://gist.githubusercontent.com/neolit123/b48fc27c8be1eb598fb41ce3cb2366f4/raw/06c1e91e076206574f4136a72aa238c3b1df878d/gistfile1.txt

with an older version i used to see this:

*** Test killed: ran too long (10m0s).

full log here:
https://pastebin.com/XNNAKhBW

requested by:
@alexbrainman

refs:
#24709

@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows labels May 8, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.11 milestone May 8, 2018
@ianlancetaylor
Copy link
Member

Using src/all.cmd will run go test -test.short cmd/go. What happens if you run go test -short -v cmd/go? That is, is the problem due to adding -v, or is it due to omitting -short?

@neolit123
Copy link
Contributor Author

Using src/all.cmd will run go test -test.short cmd/go. What happens if you run go test -short -v cmd/go? That is, is the problem due to adding -v, or is it due to omitting -short?

@ianlancetaylor

the test seems to pass using -short -v:
https://pastebin.com/ah1Jp8rn

let me know if you need me to debug a specific test.

@bradfitz bradfitz changed the title cmd/go: failed tests on win32 cmd/go: full tests can take longer than 3 minutes (especially on Windows) Jun 20, 2018
@bradfitz bradfitz added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 20, 2018
@bradfitz bradfitz modified the milestones: Go1.11, Go1.12 Jun 20, 2018
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 20, 2018
@bcmills bcmills added the Testing An issue that has been verified to require only test changes, not just a test failure. label Oct 25, 2018
@rsc
Copy link
Contributor

rsc commented Oct 25, 2018

It looks from the transcript in the link that there are some failing tests in non-short mode. Unfortunately, that's true, or at least was in May.

I don't see anything in the initial report about a 3-minute failure. Not sure why Brad put that in the title.

@rsc rsc changed the title cmd/go: full tests can take longer than 3 minutes (especially on Windows) cmd/go: go test cmd/go (without -short) may be failing on Windows Oct 25, 2018
@neolit123
Copy link
Contributor Author

neolit123 commented Oct 26, 2018

updated and rebuild latest master:

go version devel +43530e6b Fri Oct 26 12:37:30 2018 +0000 windows/amd64

go env is same as OP.

go test cmd/go -v

https://gist.githubusercontent.com/neolit123/b48fc27c8be1eb598fb41ce3cb2366f4/raw/8dc9a4c812cc5a6e81c03112768083735afa15ac/october%25202018%2520run%25201

i ran the tests a 3-4 times and it seems to fail at a different location each time.

it prompts for github login in one of the tests and if one does not enters right away it can fail with a:
*** Test killed: ran too long (10m0s). error once.`

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/181538 mentions this issue: cmd/go: in tests, don't assume that the 'git' binary is present

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/181542 mentions this issue: cmd/go: in TestScript, set $GOEXE instead of $exe

gopherbot pushed a commit that referenced this issue Jun 10, 2019
Add a helper-function to testenv to make these skips more ergonomic.
Also update a few existing skips in cmd/go/... to use it.

Updates #25300

Change-Id: I4205b4fb2b685dfac1cff3c999f954bff7b0f3c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/181538
Reviewed-by: Ian Lance Taylor <[email protected]>
gopherbot pushed a commit that referenced this issue Jun 10, 2019
$GOEXE exists and is documented in 'go env', so $exe is redundant and
a bit confusing. Notably, mod_modinfo.txt already assumes that GOEXE
is set (even though it isn't), and thus fails on Windows.

After this CL, `go test cmd/go/...` passes on a windows-amd64-2016
builder. However, given that the $PATH on the builder is very minimal
(#32430) and network access is limited, tests that rely on binaries
(such as 'git') or external networking may still be broken.

Updates #25300

Change-Id: I9d80f2a0fbaa8bc35fa2205b6898aeccecda4e94
Reviewed-on: https://go-review.googlesource.com/c/go/+/181542
Run-TryBot: Bryan C. Mills <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@bcmills
Copy link
Contributor

bcmills commented Sep 16, 2019

It's not obvious to me whether tests are still failing on Windows, but I seem to have sent CLs to fix the ones I was aware of.

It seems to me that the appropriate long-term solution is to actually run all of the tests on a builder on a regular basis (#26529), which may require adding or configuring more tools on the builder image (see also #32430).

If specific tests are failing or regressing, please let us know which ones and in what configuration, or just send a CL to fix them. Otherwise, I don't think we need to keep an umbrella issue open.

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Sep 16, 2019
@neolit123
Copy link
Contributor Author

If specific tests are failing or regressing, please let us know which ones and in what configuration, or just send a CL to fix them. Otherwise, I don't think we need to keep an umbrella issue open.

hi, i will be unable to send further information anytime soon, due to limited bandwidth.
feel free to close if needed.

@rsc rsc removed this from the Go1.14 milestone Oct 9, 2019
@rsc rsc added this to the Backlog milestone Oct 9, 2019
@bcmills bcmills changed the title cmd/go: go test cmd/go (without -short) may be failing on Windows cmd/go: long tests failing on Windows Nov 7, 2019
@bcmills
Copy link
Contributor

bcmills commented Nov 7, 2019

We are now running the long tests on the windows-amd64-longtest builder, and they are indeed failing (https://build.golang.org/log/1805b0fbce354f6ac6e08ca9196e418cb142171a).

Now that we have a builder that reproduces the failures, we can work on fixing them.

@bcmills bcmills added OS-Windows and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Nov 7, 2019
@bcmills bcmills self-assigned this Nov 7, 2019
@bcmills bcmills modified the milestones: Backlog, Go1.14 Nov 7, 2019
@bcmills bcmills assigned jayconrod and unassigned bcmills Nov 7, 2019
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/206144 mentions this issue: cmd/go: fix windows test failures

@golang golang locked and limited conversation to collaborators Nov 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Windows Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

8 participants