cmd/go: improperly synchronized -coverprofile output for packages with no tests #63356
Labels
FrozenDueToAge
GoCommand
cmd/go
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Using tip:
Does this issue reproduce with the latest release?
No, only with tip.
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
For this set of packages:
https://go.dev/play/p/5nloPBjspW9?v=gotip
run
What did you expect to see?
No error from go tool -cover.
What did you see instead?
What's happening here is that the cover profile fragments generated for the no-test packages are being written to a temporary coverage profile that has an unqualified path, meaning that if multiple test runs are happening in parallel we'll get a collision (this is what happens with foo.p above).
The text was updated successfully, but these errors were encountered: