Lock mutex when selecting destination test

This commit is contained in:
suntala 2025-05-07 20:50:20 +02:00
parent aec3488db9
commit 18af0e1526
1 changed files with 3 additions and 0 deletions

View File

@ -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
}