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

go/types: TestStdFixed test results are cached across $GOROOT/test changes #22929

mdempsky opened this issue Nov 29, 2017 · 2 comments


Copy link

commented Nov 29, 2017

"go test go/types -run TestStdFixed" results may be cached by cmd/go even after changing files in $GOROOT/test. I noticed this by changing "ignored" to "package ignored" in test/fixedbugs/issue22877.go (in CL 80759), and repeated runs of go test still output "(cached)" pass results.

/cc @rsc @griesemer


This comment has been minimized.

Copy link

commented Nov 29, 2017

Per @rsc 's e-mail to golang-dev (re: Go 1.10 cmd/go: build cache, test cache, go install, go vet, test vet):

"The cache only applies to "go test package-list", not to "go test" without a package list. So if you're working in a directory and just keep running "go test", none of those are cached."

So it should work as expected from within the go/types directory.

That said, this is probably a general problem and perhaps there needs to be a way to tell the test system to not consider the caches, ideally by the tests themselves (somebody not familiar with a specific program, trying to identify an issue, may not be aware that caching interferes).

Comments, @rsc?

@griesemer griesemer added this to the Go1.11 milestone Nov 29, 2017
@griesemer griesemer self-assigned this Nov 29, 2017

This comment has been minimized.

Copy link
Member Author

commented Nov 29, 2017

In my case, I was working in the $GOROOT/test directory, but discovered go/types tests that directory too. That's why I ran "go test go/types". I didn't expect the behavior to differ if I ran "cd ../src/go/types; go test".

I now see this is documented in "go doc cmd/go". I suppose it's time that I re-read it.

@griesemer griesemer modified the milestones: Go1.11, Go1.12 Jun 27, 2018
@griesemer griesemer modified the milestones: Go1.12, Go1.13 Oct 24, 2018
@griesemer griesemer modified the milestones: Go1.13, Go1.14 May 6, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.