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

x/vgo: internal tests failing #25501

Closed
kardianos opened this issue May 22, 2018 · 15 comments

Comments

@kardianos
Copy link
Contributor

commented May 22, 2018

Right now at rev b39cea3cb5353f4fc7f08919d32a0006ea3ed62a in the vgo repo some of the tests are failing:

?   	golang.org/x/vgo/vendor/cmd/go/internal/base	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/bug	[no test files]
ok  	golang.org/x/vgo/vendor/cmd/go/internal/cache	(cached)
?   	golang.org/x/vgo/vendor/cmd/go/internal/cfg	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/clean	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/cmdflag	[no test files]
ok  	golang.org/x/vgo/vendor/cmd/go/internal/dirhash	(cached)
?   	golang.org/x/vgo/vendor/cmd/go/internal/doc	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/envcmd	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/fix	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/fmtcmd	[no test files]
ok  	golang.org/x/vgo/vendor/cmd/go/internal/generate	0.005s
ok  	golang.org/x/vgo/vendor/cmd/go/internal/get	2.444s
?   	golang.org/x/vgo/vendor/cmd/go/internal/help	[no test files]
ok  	golang.org/x/vgo/vendor/cmd/go/internal/imports	(cached)
?   	golang.org/x/vgo/vendor/cmd/go/internal/list	[no test files]
ok  	golang.org/x/vgo/vendor/cmd/go/internal/load	0.005s
ok  	golang.org/x/vgo/vendor/cmd/go/internal/modconv	(cached)
--- FAIL: TestCodeRepo (22.80s)
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1/v0.0.0 (0.26s)
    	coderepo_test.go:387: repo.Stat("v0.0.0"): unknown revision "v0.0.0"
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1/v1.0.0 (0.22s)
    	coderepo_test.go:387: repo.Stat("v1.0.0"): unknown revision "v1.0.0"
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1_v2/v2.0.0 (0.14s)
    	coderepo_test.go:387: repo.Stat("v2.0.0"): unknown revision "v2.0.0"
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1/80d85 (0.48s)
    	coderepo_test.go:387: repo.Stat("80d85"): git fetch https://github.com/rsc/vgotest1 in /tmp/gitrepo-test-264929303/3018e98dbc31bd26cdf1d362912702d63ed0ad5c474e8d8ba65cb941a0a9f9bc: exit status 128:
    			remote: Repository not found.
    			fatal: repository 'https://github.com/rsc/vgotest1/' not found
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1/mytag (0.13s)
    	coderepo_test.go:387: repo.Stat("mytag"): unknown revision "mytag"
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1_v2/80d85 (0.25s)
    	coderepo_test.go:387: repo.Stat("80d85"): git fetch https://github.com/rsc/vgotest1 in /tmp/gitrepo-test-264929303/3018e98dbc31bd26cdf1d362912702d63ed0ad5c474e8d8ba65cb941a0a9f9bc: exit status 128:
    			remote: Repository not found.
    			fatal: repository 'https://github.com/rsc/vgotest1/' not found
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1_v54321/80d85 (0.44s)
    	coderepo_test.go:387: repo.Stat("80d85"): git fetch https://github.com/rsc/vgotest1 in /tmp/gitrepo-test-264929303/3018e98dbc31bd26cdf1d362912702d63ed0ad5c474e8d8ba65cb941a0a9f9bc: exit status 128:
    			remote: Repository not found.
    			fatal: repository 'https://github.com/rsc/vgotest1/' not found
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1_submod/v1.0.4 (0.14s)
    	coderepo_test.go:387: repo.Stat("v1.0.4"): unknown revision "submod/v1.0.4"
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1/v1.1.0 (0.39s)
    	coderepo_test.go:387: repo.Stat("v1.1.0"): unknown revision "v1.1.0"
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1_v2/v2.0.1 (0.15s)
    	coderepo_test.go:387: repo.Stat("v2.0.1"): unknown revision "v2.0.1"
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1_v2/v2.0.3 (0.13s)
    	coderepo_test.go:387: repo.Stat("v2.0.3"): unknown revision "v2.0.3"
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1_v2/v2.0.4 (0.14s)
    	coderepo_test.go:387: repo.Stat("v2.0.4"): unknown revision "v2.0.4"
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1_v2/v2.0.5 (0.14s)
    	coderepo_test.go:387: repo.Stat("v2.0.5"): unknown revision "v2.0.5"
    --- FAIL: TestCodeRepo/vcs-test.golang.org_go_mod_gitrepo1/master (0.00s)
    	coderepo_test.go:371: Lookup("vcs-test.golang.org/go/mod/gitrepo1"): unknown module vcs-test.golang.org/go/mod/gitrepo1: no go-import tags
--- FAIL: TestCodeRepoVersions (1.87s)
    --- FAIL: TestCodeRepoVersions/github.com_rsc_vgotest1 (0.38s)
    	coderepo_test.go:556: Versions(""): git ls-remote -q https://github.com/rsc/vgotest1 in : exit status 128:
    			remote: Repository not found.
    			fatal: repository 'https://github.com/rsc/vgotest1/' not found
    --- FAIL: TestCodeRepoVersions/github.com_rsc_vgotest1#01 (0.21s)
    	coderepo_test.go:556: Versions("v1.0"): git ls-remote -q https://github.com/rsc/vgotest1 in : exit status 128:
    			remote: Repository not found.
    			fatal: repository 'https://github.com/rsc/vgotest1/' not found
    --- FAIL: TestCodeRepoVersions/github.com_rsc_vgotest1_v2 (0.13s)
    	coderepo_test.go:556: Versions(""): git ls-remote -q https://github.com/rsc/vgotest1 in : exit status 128:
    			remote: Repository not found.
    			fatal: repository 'https://github.com/rsc/vgotest1/' not found
--- FAIL: TestLatest (0.64s)
    --- FAIL: TestLatest/github.com_rsc_vgotest1 (0.19s)
    	coderepo_test.go:609: Latest(): git ls-remote -q https://github.com/rsc/vgotest1 in : exit status 128:
    			remote: Repository not found.
    			fatal: repository 'https://github.com/rsc/vgotest1/' not found
--- FAIL: TestConvertLegacyConfig (27.44s)
    --- FAIL: TestConvertLegacyConfig/github.com_docker_distribution_v0.0.0-20150410205453-85de3967aa93 (0.00s)
    	convert_test.go:107: golden:23: invalid module: gopkg.in/yaml.v2 should be v2, not v0 (v0.0.0-20150116202057-bef53efd0c76)
FAIL
FAIL	golang.org/x/vgo/vendor/cmd/go/internal/modfetch	56.473s
?   	golang.org/x/vgo/vendor/cmd/go/internal/modfetch/bitbucket	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/modfetch/codehost	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/modfetch/github	[no test files]
--- FAIL: TestReadZip (4.64s)
    --- FAIL: TestReadZip/https://github.com/rsc/vgotest1/submod/v1.0.4/submod (0.22s)
    	fetch_test.go:299: ReadZip: unexpected error unknown revision "submod/v1.0.4"
FAIL
FAIL	golang.org/x/vgo/vendor/cmd/go/internal/modfetch/gitrepo	14.669s
?   	golang.org/x/vgo/vendor/cmd/go/internal/modfetch/googlesource	[no test files]
ok  	golang.org/x/vgo/vendor/cmd/go/internal/modfile	0.003s
?   	golang.org/x/vgo/vendor/cmd/go/internal/modinfo	[no test files]
ok  	golang.org/x/vgo/vendor/cmd/go/internal/module	(cached)
ok  	golang.org/x/vgo/vendor/cmd/go/internal/mvs	(cached)
?   	golang.org/x/vgo/vendor/cmd/go/internal/run	[no test files]
ok  	golang.org/x/vgo/vendor/cmd/go/internal/search	(cached)
ok  	golang.org/x/vgo/vendor/cmd/go/internal/semver	(cached)
?   	golang.org/x/vgo/vendor/cmd/go/internal/str	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/test	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/tool	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/version	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/vet	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/vgo	[no test files]
?   	golang.org/x/vgo/vendor/cmd/go/internal/web	[no test files]
ok  	golang.org/x/vgo/vendor/cmd/go/internal/web2	(cached)
?   	golang.org/x/vgo/vendor/cmd/go/internal/webtest	[no test files]
ok  	golang.org/x/vgo/vendor/cmd/go/internal/work	0.006s

We should fix this before integrating with the main repo.

@gopherbot gopherbot added this to the vgo milestone May 22, 2018

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2018

I made vgotest1 no longer private today (oops).

The ConvertLegacyConfig failure still needs to be investigated.

@gopherbot

This comment has been minimized.

Copy link

commented Jun 6, 2018

Change https://golang.org/cl/116836 mentions this issue: vendor/cmd/go/interna/modfetch: fix module lines with trailing comments

@gopherbot

This comment has been minimized.

Copy link

commented Jun 6, 2018

Change https://golang.org/cl/116615 mentions this issue: cmd/go: fix broken TestExecutableGOROOT

@gopherbot

This comment has been minimized.

Copy link

commented Jun 7, 2018

Change https://golang.org/cl/117035 mentions this issue: vendor/cmd/go: fix TestDefaultGOPATH

@gopherbot

This comment has been minimized.

Copy link

commented Jun 7, 2018

Change https://golang.org/cl/117115 mentions this issue: vendor/cmd/go/internal/modfetch: update gopkg.in requirements in TestConvertLegacyConfig

@gopherbot

This comment has been minimized.

Copy link

commented Jun 7, 2018

Change https://golang.org/cl/117235 mentions this issue: vendor/cmd/go: fix TestConvertLegacyConfig

@kardianos

This comment has been minimized.

Copy link
Contributor Author

commented Jun 7, 2018

I suspect an HTTP server is now guarding test requests:

--- FAIL: TestCodeRepo (23.96s)
    --- FAIL: TestCodeRepo/vcs-test.golang.org_go_mod_gitrepo1/master (0.00s)
        coderepo_test.go:372: Lookup("vcs-test.golang.org/go/mod/gitrepo1"): unknown module vcs-test.golang.org/go/mod/gitrepo1: no go-import tags, response 599 unexpected request (no canned response)

The call to https://vcs-test.golang.org/go/mod/gitrepo1?go-get=1 is returning a 599 "no canned response" for me, but only from the test. When I hit it from my browser it looks good.

@kardianos

This comment has been minimized.

Copy link
Contributor Author

commented Jun 8, 2018

Ah, I figured out where I went wrong above. The specific GET didn't have a recorded response. Adding it with -webtest "record" fixed it.

gopherbot pushed a commit to golang/vgo that referenced this issue Jun 12, 2018
vendor/cmd/go/internal/modfetch: update gopkg.in requirements in Test…
…ConvertLegacyConfig

Support for major-version parsing for gopkg.in dependencies was
improved in CL 107658, but TestConvertLegacyConfig was apparently not
updated to reflect that.

Updates golang/go#25501.

Before:

--- FAIL: TestConvertLegacyConfig (32.51s)
    --- FAIL: TestConvertLegacyConfig/github.com_docker_distribution_v0.0.0-20150410205453-85de3967aa93 (0.00s)
        convert_test.go:102: golden:23: invalid module: gopkg.in/yaml.v2 should be v2, not v0 (v0.0.0-20150116202057-bef53efd0c76)

After:

--- PASS: TestConvertLegacyConfig (40.00s)
    --- PASS: TestConvertLegacyConfig/github.com_docker_distribution_v0.0.0-20150410205453-85de3967aa93 (40.00s)

Change-Id: Ied0121e78b43355f6349684f1e1836da9e587374
Reviewed-on: https://go-review.googlesource.com/117115
Reviewed-by: Russ Cox <rsc@golang.org>
gopherbot pushed a commit to golang/vgo that referenced this issue Jun 12, 2018
vendor/cmd/go: fix TestConvertLegacyConfig
"vgo build" caches to $GOPATH, which defaults to $HOME/go. Therefore,
tests of a "build" command must set at least one of {$GOPATH, $HOME}.

Updates golang/go#25501.

Change-Id: I798a0b180c3d8c4850e9a54e303bbcef1bab5faf
Reviewed-on: https://go-review.googlesource.com/117235
Reviewed-by: Russ Cox <rsc@golang.org>
@gopherbot

This comment has been minimized.

Copy link

commented Jun 12, 2018

Change https://golang.org/cl/118415 mentions this issue: vendor/cmd/go: fix a bad merge from CL 117235

gopherbot pushed a commit to golang/vgo that referenced this issue Jun 12, 2018
vendor/cmd/go: skip TestExecutableGOROOT
This test appears to have been broken by https://golang.org/cl/104975.

Updates golang/go#24694.
Updates golang/go#25501.

Before:

~/src/golang.org/x/vgo/vendor/cmd/go$ go test -run=TestExecutableGOROOT .
--- FAIL: TestExecutableGOROOT (0.15s)
    --- FAIL: TestExecutableGOROOT/RuntimeGoroot (0.00s)
        go_test.go:4598: /tmp/gotest104327550/new/bin/go run testdata/print_goroot.go: exit status 1, vgo requires Go 1.10 but VGOROOT=/tmp/gotest104327550/new is not a Go 1.10 source tree
FAIL
FAIL    golang.org/x/vgo/vendor/cmd/go  1.730s

After:

~/src/golang.org/x/vgo/vendor/cmd/go$ go test -run=TestExecutableGOROOT .
ok      golang.org/x/vgo/vendor/cmd/go  2.870s

Change-Id: I155a1344ec704c53d3678390cafc1ad33d1a338b
Reviewed-on: https://go-review.googlesource.com/116615
Reviewed-by: Russ Cox <rsc@golang.org>
gopherbot pushed a commit to golang/vgo that referenced this issue Jun 12, 2018
vendor/cmd/go: skip TestDefaultGOPATH
It seems to have been broken by CL 104975: we were invoking `vgo env`
with a GOROOT that did not have a complete source tree.

Updates golang/go#25501.

Change-Id: I238f710bc094cbae9381e3fdd49d5c1f999b5ea5
Reviewed-on: https://go-review.googlesource.com/117035
Reviewed-by: Russ Cox <rsc@golang.org>
@gopherbot

This comment has been minimized.

Copy link

commented Jun 13, 2018

Change https://golang.org/cl/118718 mentions this issue: cmd/go: move modfetch.modPath to modfile.ModulePath, fix // handling

gopherbot pushed a commit to golang/vgo that referenced this issue Jun 14, 2018
cmd/go: move modfetch.modPath to modfile.ModulePath, fix // handling
Replacement for CL 116836.

For golang/go#25501.

Change-Id: Ie4f15dc11d9499aeeb497b7aceff2efd2bcd7ce3
Reviewed-on: https://go-review.googlesource.com/118718
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
gopherbot pushed a commit to golang/vgo that referenced this issue Jun 14, 2018
vendor/cmd/go: fix a bad merge from CL 117235
Apparently I need to learn to trust Gerrit less. It showed the correct diff, I
pressed Submit, and when I went to rebase the change was in the wrong place.

Updates golang/go#25501.

Change-Id: I85dfc9b57090bdd8ac888e705175c5397938405e
Reviewed-on: https://go-review.googlesource.com/118415
Reviewed-by: Russ Cox <rsc@golang.org>
@gopherbot

This comment has been minimized.

Copy link

commented Jun 14, 2018

Change https://golang.org/cl/119015 mentions this issue: cmd/go: skip failing TestNewReleaseRebuildsStalePackagesInGOPATH

gopherbot pushed a commit to golang/vgo that referenced this issue Jun 15, 2018
cmd/go: skip failing TestNewReleaseRebuildsStalePackagesInGOPATH
Updates golang/go#25501.

Current failure mode:

--- FAIL: TestNewReleaseRebuildsStalePackagesInGOPATH (3.38s)
    go_test.go:910: running testgo [install -i p1]
    go_test.go:911: running testgo [list -f {{.Stale}}:{{.StaleReason}} p1]
    go_test.go:911: standard output:
    go_test.go:911: false:

    go_test.go:920: running testgo [list -f {{.Stale}}:{{.StaleReason}} p1]
    go_test.go:920: standard output:
    go_test.go:920: false:

    go_test.go:927: running testgo [list -f {{.Stale}}:{{.StaleReason}} p1]
    go_test.go:927: standard output:
    go_test.go:927: false:

    go_test.go:927: ./testgo list claims p1 is NOT stale, incorrectly, after changing sys.go

Change-Id: I58b78b7e9b3ddf16e0f7949fc33dba89aa3d5b93
Reviewed-on: https://go-review.googlesource.com/119015
Reviewed-by: Russ Cox <rsc@golang.org>
@gopherbot

This comment has been minimized.

Copy link

commented Jun 15, 2018

Change https://golang.org/cl/119075 mentions this issue: cmd/go/internal/modfetch: relax error matching in TestCodeRepo

@gopherbot

This comment has been minimized.

Copy link

commented Jun 15, 2018

Change https://golang.org/cl/119076 mentions this issue: cmd/go: skip remaining failing tests

@bcmills

This comment has been minimized.

Copy link
Member

commented Jun 15, 2018

As of CL 119076, go test ./... in the vendor/ directory succeeds for me. Please let me know if you see any remaining failures once that lands.

gopherbot pushed a commit to golang/vgo that referenced this issue Jun 19, 2018
cmd/go: skip remaining failing tests
After this change and CL 119075, "go test ./..." from the vendor
directory succeeds.

Updates golang/go#25501.

Change-Id: Ife1904ea162b4108ff45db2f0c87079e803b1e99
Reviewed-on: https://go-review.googlesource.com/119076
Reviewed-by: Russ Cox <rsc@golang.org>
gopherbot pushed a commit to golang/vgo that referenced this issue Jun 19, 2018
cmd/go/internal/modfetch: update expected errors in TestCodeRepo
Updates golang/go#25501.

Before:

--- FAIL: TestCodeRepo (20.13s)
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1_v2/v2.0.0 (0.47s)
        coderepo_test.go:424: repo.Zip("v2.0.0"): missing or invalid go.mod, want error "missing go.mod"
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1_v2/80d85 (0.34s)
        coderepo_test.go:409: repo.GoMod("v2.0.0-20180219231006-80d85c5d4d17"): missing or invalid go.mod, want "missing go.mod"
        coderepo_test.go:424: repo.Zip("v2.0.0-20180219231006-80d85c5d4d17"): missing or invalid go.mod, want error "missing go.mod"
    --- FAIL: TestCodeRepo/github.com_rsc_vgotest1_v54321/80d85 (0.28s)
        coderepo_test.go:424: repo.Zip("v54321.0.0-20180219231006-80d85c5d4d17"): missing or invalid go.mod, want error "missing go.mod"
vgo: lookup code.google.com/p/go-uuid/uuid: unknown module code.google.com/p/go-uuid/uuid: no go-import tags

After:

ok      golang.org/x/vgo/vendor/cmd/go/internal/modfetch        123.433s

Change-Id: I1263af1104b36b519ab9e79c74bb8c2eed05797e
Reviewed-on: https://go-review.googlesource.com/119075
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
@rsc

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2018

I think this is fixed.

@rsc rsc closed this Jun 29, 2018

@golang golang locked and limited conversation to collaborators Jun 29, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.