Go version

go version go1.25rc1 darwin/arm64

Output of go env in your module/workspace:

AR='ar'
CC='clang'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='clang++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/Users/josiah/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/Users/josiah/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/1d/vxk0phqs32l4q53sp2pm0tpr0000gn/T/go-build2113659605=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/Users/josiah/Code/reproduce-synctest/go.mod'
GOMODCACHE='/Users/josiah/Code/Go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/josiah/Code/Go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/josiah/sdk/go1.25rc1'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/josiah/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/josiah/sdk/go1.25rc1/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.25rc1'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

Call a function marked with t.Helper() from within synctest.Test, like this: https://go.dev/play/p/m1k9XbOSFql?v=gotip

What did you see happen?

$ go test ./...
--- FAIL: TestWithoutSyncTest (0.00s)
    reproduce_test.go:9: a != b
--- FAIL: TestWithSyncTest (0.00s)
    reproduce_test.go:21: a != b # <--- notice that line 21 is printed, which is the failure in the test helper
FAIL
FAIL    reproduce       0.235s
FAIL

What did you expect to see?

$ go test ./...
--- FAIL: TestWithoutSyncTest (0.00s)
    reproduce_test.go:9: a != b
--- FAIL: TestWithSyncTest (0.00s)
    reproduce_test.go:14: a != b # <-- printing line 14 would match the behavior when not using `synctest.Test`
FAIL
FAIL    reproduce       0.235s
FAIL

Comment From: gabyhelp

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)