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

Open
mdempsky opened this issue Nov 29, 2017 · 2 comments
Open
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@mdempsky
Copy link
Member

"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

@griesemer
Copy link
Contributor

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
@mdempsky
Copy link
Member Author

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 added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 6, 2019
@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
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants