aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/testdata
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2023-04-24 10:18:07 -0400
committerGopher Robot <gobot@golang.org>2023-04-24 18:13:14 +0000
commit5256f90c98cd19b983d35d2377b3fecfd966671e (patch)
tree1507c324fec6e1b6e6f1a2d9e65351e1863bd922 /src/runtime/testdata
parentc80cedec9378b0a1cd5cb400e179bb25e2e7f810 (diff)
downloadgo-5256f90c98cd19b983d35d2377b3fecfd966671e.tar.xz
runtime: fix CgoRaceprof and CgoRaceSignal build failures
TestRaceProf and TestRaceSignal were changed to run on all platforms that support the race detector as of CL 487575, but the testprogcgo source files needed to run the test rely on POSIX threads and were still build-constrained to only linux/amd64 and freebsd/amd64. Since the C test program appears to require only POSIX APIs, update the constraint to build the source file on all Unix platforms, and update the tests to skip on Windows. This may slightly increase testprogcgo build time on Unix platforms that do not support the race detector. Change-Id: I704dd496d475a3cd2e2da2a09c7d2e3bb8e96d02 Reviewed-on: https://go-review.googlesource.com/c/go/+/488115 Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Run-TryBot: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/runtime/testdata')
-rw-r--r--src/runtime/testdata/testprogcgo/raceprof.go4
-rw-r--r--src/runtime/testdata/testprogcgo/racesig.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/testdata/testprogcgo/raceprof.go b/src/runtime/testdata/testprogcgo/raceprof.go
index c098e16196..68cabd4101 100644
--- a/src/runtime/testdata/testprogcgo/raceprof.go
+++ b/src/runtime/testdata/testprogcgo/raceprof.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build (linux && amd64) || (freebsd && amd64)
-// +build linux,amd64 freebsd,amd64
+//go:build unix
+// +build unix
package main
diff --git a/src/runtime/testdata/testprogcgo/racesig.go b/src/runtime/testdata/testprogcgo/racesig.go
index 9352679714..b7f3a21529 100644
--- a/src/runtime/testdata/testprogcgo/racesig.go
+++ b/src/runtime/testdata/testprogcgo/racesig.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build (linux && amd64) || (freebsd && amd64)
-// +build linux,amd64 freebsd,amd64
+//go:build unix
+// +build unix
package main