diff --git a/src/testing/testing.go b/src/testing/testing.go index eeac00ffad..13f4c8d505 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -1035,6 +1035,9 @@ func (c *common) log(s string) { // destination selects the test to which output should be appended. It returns the // test if it is incomplete. Otherwise, it finds its closest incomplete parent. func (c *common) destination() *common { + c.mu.Lock() + defer c.mu.Unlock() + if !c.done { return c }