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
Those tests do not currently emit any output when run, and as far as I can tell the testing.BenchmarkResult type does not provide a way for them to do so. As a result, I believe that failures in calls to testing.Benchmark in general tend to go undetected.
~/go/src$ go1.21rc2 test testing -run='TestRunParallel.*' -v -count=1
=== RUN TestRunParallel
--- PASS: TestRunParallel (0.16s)
=== RUN TestRunParallelFail
--- PASS: TestRunParallelFail (0.00s)
=== RUN TestRunParallelFatal
--- PASS: TestRunParallelFatal (0.00s)
=== RUN TestRunParallelSkipNow
--- PASS: TestRunParallelSkipNow (0.00s)
ok testing 0.178s
To allow users of testing.Benchmark to write more robust benchmarks, I propose the addition of the following fields to the BenchmarkResult struct:
Log byte// The output produced by calls to b.Log, b.Error, b.Skip, and similar during the benchmark run.Failedbool// The value returned by b.Failed at the end of the run.Skippedbool// The value returned by b.Skipped at the end of the run.
Since these are new fields, I believe this change is strictly backward-compatible.
The text was updated successfully, but these errors were encountered: