lucky(~/src/issue) % cat issue_test.go
package issue
import "testing"
func BenchmarkFail(b *testing.B) {
for n := 0; n < b.N; n++ {
b.Fatal("non zero exit")
}
}
lucky(~/src/issue) % go test issue_test.go -test.bench=.
testing: warning: no tests to run
PASS
BenchmarkFail-4 --- FAIL: BenchmarkFail-4
issue_test.go:7: non zero exit
ok command-line-arguments 0.003s
lucky(~/src/issue) % echo $?
0