You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
go-test: a failing benchmark in -v=false JSON shows Go's benchmark header as failure context #5215
go test -json -v=false -bench . -benchtime 10x -run '^$' ./failb (Go 1.26.1; BenchmarkFail calls b.Fatal, BenchmarkGood passes), piped to rtk pipe -f go-test:
Go test: 0 passed, 1 failed in 1 packages
failb (0 passed, 1 failed)
[FAIL] BenchmarkFail
f_test.go:7: benchmark intentionally failed
goos: linux
In quiet mode test2json tags the lines that follow the failing benchmark with its Test field (goos:, goarch:, pkg:, cpu:, the next benchmark's name and result), so the failure-line selection picks goos: linux as context. Same output on v1.2.1 and develop ef0b734.
There are 2 open pull requests for this issue: #5216, #5220 (oldest first).
If you were about to start on it, reviewing or testing one of these helps more than another pull request: a note on which approach fits, or a test result on your setup, is welcome on the pull request itself.
Activity
KuSh commentedon Nov 28, 2026
There are 2 open pull requests for this issue: #5216, #5220 (oldest first).
If you were about to start on it, reviewing or testing one of these helps more than another pull request: a note on which approach fits, or a test result on your setup, is welcome on the pull request itself.