diff --git a/src/runtime/proc_test.go b/src/runtime/proc_test.go index 7064b0edd86..fd12945be0c 100644 --- a/src/runtime/proc_test.go +++ b/src/runtime/proc_test.go @@ -428,6 +428,9 @@ func TestPingPongHog(t *testing.T) { } func BenchmarkPingPongHog(b *testing.B) { + if b.N == 0 { + return + } defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1)) // Create a CPU hog