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

Comments

Projects
None yet
2 participants
@mdempsky
Member

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

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 modified the milestones: Go1.11, Go1.12 Jun 27, 2018

@griesemer griesemer modified the milestones: Go1.12, Go1.13 Oct 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment