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

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

mdempsky opened this issue Nov 29, 2017 · 2 comments
Assignees
Milestone

Comments

@mdempsky
Copy link
Member

@mdempsky mdempsky 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

@griesemer
Copy link
Contributor

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

@mdempsky mdempsky 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 removed this from the Go1.11 milestone Jun 27, 2018
@griesemer griesemer added this to the Go1.12 milestone Jun 27, 2018
@griesemer griesemer removed this from the Go1.12 milestone Oct 24, 2018
@griesemer griesemer added this to the Go1.13 milestone Oct 24, 2018
@griesemer griesemer removed this from the Go1.13 milestone May 6, 2019
@griesemer griesemer added this to the Go1.14 milestone May 6, 2019
@rsc rsc removed this from the Go1.14 milestone Oct 9, 2019
@rsc rsc added this to the Backlog milestone Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants