Skip to content

Commit 18af0e1

Browse files
author
suntala
committed
Lock mutex when selecting destination test
1 parent aec3488 commit 18af0e1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/testing/testing.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,9 @@ func (c *common) log(s string) {
10351035
// destination selects the test to which output should be appended. It returns the
10361036
// test if it is incomplete. Otherwise, it finds its closest incomplete parent.
10371037
func (c *common) destination() *common {
1038+
c.mu.Lock()
1039+
defer c.mu.Unlock()
1040+
10381041
if !c.done {
10391042
return c
10401043
}

0 commit comments

Comments
 (0)