-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: go test all should not run standard library tests #29676
Comments
Thanks for reporting this. I see two different issues here
Regarding (1), I think it would be better to report those failures separately, by opening new github issues (you could group the failures by package). Regarding (2), while I personally agree with this:
it's also true that special-casing them would make the whole system less elegant, and the I'm going to re-title this specific issue to be about (2), if you don't mind. Feel free to open new issues about the specific test failures on your system, since those should be fixed anyway, and separately from the resolution of (2). |
The stdlib test failures may be related to #28387. If they are, some (like package os) are already fixed on tip. |
Thanks. Regarding desired behavior, some personal observations of Go's philosophy:
If we do some basic calculations of how much time is wasted by users running the stdlib tests globally (assuming they run Also, there's very little a developer can do if the stdlib tests fail except maybe downgrade their version of Go, or construct a local environment where the tests pass. So whether or not the stdlib tests fail as part of |
I think part of the theory is:
In any event, I think that was part of the theory, but certainly makes sense to evaluate how things are working in practice.
One thought would be
If that is correct, then perhaps as a work-around in the near-term you could couple it with
My morning coffee is still kicking in, so please treat that as something that might be in the ball park of what might help, rather than a definitive answer. Also, that of course is not an ideal long-term solution if people had to do something like that frequently. In any event, see the official doc, and also Dave Cheney has a great blog post on using 'go list'. |
That sounds reasonable, but for most users using common environments, running the tests is a waste of CPU cycles. Test caching, which I forgot about, would help immensely, but I imagine that makes disabling caching expensive without also filtering out stdlib tests (again, a question of defaults. There would of course be ways to explicitly run stdlib tests).
Oops, yes, Test caching would alleviate a lot of overhead. |
If a standard library test fails, that should provide a strong signal: it should indicate either a bug (perhaps an invalid assumption) in the Go standard library, or a defect of some sort in your particular platform (perhaps a kernel bug). The fact that standard library tests do not all work reliably today is something we should fix, but skipping those tests (and discarding the information they could otherwise provide) is not a great solution. |
Closing as duplicate of #26317. (See especially #26317 (comment).) |
Bugs for the test faliures:
#28387
#29712
#29713
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, 1.11.4 is the latest (not counting betas?).
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
All tests pass
What did you see instead?
Test failures:
go test all
is the Blessed command suggested by the Modules doc.The text was updated successfully, but these errors were encountered: