diff options
Diffstat (limited to 'src/testing/testing.go')
| -rw-r--r-- | src/testing/testing.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go index 6fc8c4fa9f..bf83df8863 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -860,11 +860,15 @@ func (c *common) Cleanup(f func()) { c.cleanup = func() { if oldCleanup != nil { defer func() { + c.mu.Lock() c.cleanupPc = oldCleanupPc + c.mu.Unlock() oldCleanup() }() } + c.mu.Lock() c.cleanupName = callerName(0) + c.mu.Unlock() f() } var pc [maxStackLen]uintptr |
