Description
cmd/go's tests start an HTTP server by doing net.Listen("tcp", "localhost:0") and then try to make URLs using l.Addr().String(), which ends up being localhost:<port>
.
This worked for some tests but somehow is failing when run as part of TestScript, as of CL 124697.
I can't see what is different between the old hand-written-in-Go tests and the new script-based tests.
One possibility was the use of t.Parallel, but I commented that out in TestScript and still no luck.
The trybots failed on that CL and the gomote failed too when run by hand. I submitted it anyway to see if the builders were any different, since it is so mysterious. I expect them to fail too. If they do I will skip those scripts on Windows.
--- FAIL: TestScript/mod_require_exclude (0.04s)
script_test.go:134:
# build with no newer version to satisfy exclude (0.036s)
> env GO111MODULE=on
> ! go list -m all
[stderr]
go: errors parsing go.mod:
$WORK\gopath\src\go.mod:2: invalid module version "latest": Get http://127.0.0.1:49713/mod/rsc.io/sampler/@v/list: dial tcp 127.0.0.1:49713: socket: The requested service provider could not be loaded or initialized.
$WORK\gopath\src\go.mod:3: invalid module version "latest": Get http://127.0.0.1:49713/mod/rsc.io/sampler/@v/list: dial tcp 127.0.0.1:49713: socket: The requested service provider could not be loaded or initialized.
[exit status 1]
> stderr 'no newer version available'
FAIL: testdata\script\mod_require_exclude.txt:4: no match for `no newer version available` found in stderr
We need to turn the script tests back on for Windows before the release.
I also tried using [::1]:0 instead of localhost:0 and it did not help.