From 49cdf0c42e320dfed044baa551610f081eafb781 Mon Sep 17 00:00:00 2001 From: Damien Neil Date: Fri, 20 Jun 2025 14:44:09 +0100 Subject: testing, testing/synctest: handle T.Helper in synctest bubbles Fixes #74199 Change-Id: I6a15fbd59a3a3f8c496440f56d09d695e1504e4e Reviewed-on: https://go-review.googlesource.com/c/go/+/682576 LUCI-TryBot-Result: Go LUCI Reviewed-by: Alan Donovan Auto-Submit: Damien Neil --- src/testing/testing.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/testing/testing.go') diff --git a/src/testing/testing.go b/src/testing/testing.go index b2d4c0c938..3475bfca4a 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -1261,6 +1261,9 @@ func (c *common) Skipped() bool { // When printing file and line information, that function will be skipped. // Helper may be called simultaneously from multiple goroutines. func (c *common) Helper() { + if c.isSynctest { + c = c.parent + } c.mu.Lock() defer c.mu.Unlock() if c.helperPCs == nil { -- cgit v1.3