From: Josh Bleecher Snyder Date: Mon, 6 Apr 2020 16:07:03 +0000 (-0700) Subject: runtime: skip TestPingPongHog in race mode X-Git-Tag: go1.15beta1~637 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=97711bfd60575b2f51e212b0b5181729597e9091;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- diff --git a/src/runtime/proc_test.go b/src/runtime/proc_test.go index acee7a1819..81bcb98aeb 100644 --- a/src/runtime/proc_test.go +++ b/src/runtime/proc_test.go @@ -6,6 +6,7 @@ package runtime_test import ( "fmt" + "internal/race" "math" "net" "runtime" @@ -422,6 +423,11 @@ func TestPingPongHog(t *testing.T) { if testing.Short() { t.Skip("skipping in -short mode") } + if race.Enabled { + // The race detector randomizes the scheduler, + // which causes this test to fail (#38266). + t.Skip("skipping in -race mode") + } defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1)) done := make(chan bool)