Closed maruel closed 7 years ago
Hi @maruel. Thanks for the patch. I'm a little confused though.
What is the exact command being mishandled, and what is the output of the equivalent 'go test' command? There really is supposed to be an output line terminating the test output in all cases. It's possible that the regexp is stale instead.
crypto/internal/cipherhw in the standard library was the first package I found with no tests, but I tried a few variants like
rm -rf ~/Library/Caches/go-test-cache
gt crypto/internal/cipherhw
rm -rf ~/Library/Caches/go-test-cache
cd $(go env GOROOT)/src/crypto/internal/cipherhw
gt
and they seem to work.
I reproduced this issue with the best probability with https://github.com/google/periph/commit/543e702ffd6fc0e3d30ae8910ef46581180375a8 to be checked out as periph.io/x/periph
Here's two examples failures as part of periph's CI through gohci workers: https://gist.github.com/maruel/29cf429ccb6c5e6da8ea987bf04f2eca#file-cmd1-failed-in-18-338s https://gist.github.com/maruel/6f12a8a68c371edac8ebab8744d25293#file-cmd8-failed-in-20-266s
The command is gt ./...
from $GOPATH/src/periph.io/x/periph
.
I think it is linked to a combination of "packages with no test" and some level of timing randomness, as I've been observing this issue at a low frequency for an hundred of commits at various probabilities but had trouble finding the root cause.
I forgot to state above, I'm not confident this is the right fix. :/
Thanks for the test case. Found and fixed, I believe.
Thanks! Will report back iff I ever see this again.
If you do see this again, it will be the new sanity check. What was actually happening was that things were off-by-one matching test output to packages, so that for example the cached output recorded for periph.io/x/periph/host/allwinner was actually the output for periph.io/x/periph/host/bcm283x. Eventually you'd have been unhappy with that. :-)
This can happen when the cache is cleared and the last package to test doesn't have tests.
I somewhat recall that you had stated that this was a failed experiment but I failed to find any written explanation so I don't know if you accept changes to this repository.
I am experiencing this on https://periph.io/x/periph, as the last package "videocore" doesn't have test yet. There seem to be some amount of non-determinism in the reproduction but it's very frequent on go1.8, reproduced on Windows 10, Raspberry PI 3 and a high end z620.
Thanks