Skip to content

Commit 97711bf

Browse files
committed
runtime: skip TestPingPongHog in race mode
TestPingPongHog tests properties of the scheduler. But the race detector intentionally does randomized scheduling, so the test is not applicable. Fixes #38266 Change-Id: Ib06aa317b2776cb1faa641c4e038e2599cf70b2d Reviewed-on: https://go-review.googlesource.com/c/go/+/227344 Run-TryBot: Josh Bleecher Snyder <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 4874835 commit 97711bf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/runtime/proc_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package runtime_test
66

77
import (
88
"fmt"
9+
"internal/race"
910
"math"
1011
"net"
1112
"runtime"
@@ -422,6 +423,11 @@ func TestPingPongHog(t *testing.T) {
422423
if testing.Short() {
423424
t.Skip("skipping in -short mode")
424425
}
426+
if race.Enabled {
427+
// The race detector randomizes the scheduler,
428+
// which causes this test to fail (#38266).
429+
t.Skip("skipping in -race mode")
430+
}
425431

426432
defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))
427433
done := make(chan bool)

0 commit comments

Comments
 (0)