From: Ian Lance Taylor Date: Fri, 21 Apr 2023 22:28:19 +0000 (-0700) Subject: runtime: use platform.RaceDetectorSupported for -race tests X-Git-Tag: go1.21rc1~797 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a5297f59a73aef5e965cd29b3e666836d6863243;p=gostls13.git runtime: use platform.RaceDetectorSupported for -race tests Don't try to duplicate the list of targets that support -race. Change-Id: I889d5c2f4884de89d88f8efdc89608aa73584a8a Reviewed-on: https://go-review.googlesource.com/c/go/+/487575 Run-TryBot: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Reviewed-by: Michael Knyszek TryBot-Result: Gopher Robot Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go index 1d8d874ca1..5ed82d6eea 100644 --- a/src/runtime/crash_cgo_test.go +++ b/src/runtime/crash_cgo_test.go @@ -368,8 +368,8 @@ func TestCgoPprofThreadNoTraceback(t *testing.T) { } func TestRaceProf(t *testing.T) { - if (runtime.GOOS != "linux" && runtime.GOOS != "freebsd") || runtime.GOARCH != "amd64" { - t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH) + if !platform.RaceDetectorSupported(runtime.GOOS, runtime.GOARCH) { + t.Skipf("skipping on %s/%s because race detector not supported", runtime.GOOS, runtime.GOARCH) } testenv.MustHaveGoRun(t) @@ -396,11 +396,12 @@ func TestRaceProf(t *testing.T) { } func TestRaceSignal(t *testing.T) { - t.Parallel() - if (runtime.GOOS != "linux" && runtime.GOOS != "freebsd") || runtime.GOARCH != "amd64" { - t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH) + if !platform.RaceDetectorSupported(runtime.GOOS, runtime.GOARCH) { + t.Skipf("skipping on %s/%s because race detector not supported", runtime.GOOS, runtime.GOARCH) } + t.Parallel() + testenv.MustHaveGoRun(t) // This test requires building various packages with -race, so