testing: duplicate "pass" action from TestFlag/-test.v=test2json
when run with go test -json
#59181
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Testing
An issue that has been verified to require only test changes, not just a test failure.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
When testing the entire standard library with -json flag, one of the tests produces a "pass" action event twice rather than the usual one time maximum.
This can be reproduced with:
It also seems to reproduce if invoking the test binary and test2json manually:
What did you expect to see?
What did you see instead?
I'm not definitively sure that it is a bug for a pass action to be emitted more than once for the same package/test, but it seems unexpected. This came up from #37486, and out of all the packages and tests in the standard library, it happens only with this one.
As a quick investigation note, the 'TestFlag/-test.v=test2json' test in testing package (i.e.,
go test -v -run='TestFlag/-test.v=test2json' testing
) seems to emit 0x16 bytes, which test2json also uses, and that may contribute to its confusion.It seems like a minor issue given I haven't yet encountered any tools that this causes a serious problem in, and in tools one has control over it's easy to work around by ignoring it, but reporting it anyway.
CC @bcmills, @matloob.
The text was updated successfully, but these errors were encountered: