aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2017-06-14 10:17:29 -0700
committerIan Lance Taylor <iant@golang.org>2017-06-14 17:28:02 +0000
commit03a4a5c98885245a99d67b684acacff4f7b2326e (patch)
tree6f05af7d023de7e79680f31a96fa90c3e9273db2
parentdd94bacddcd3039e63207856138028c9541b3067 (diff)
downloadgo-03a4a5c98885245a99d67b684acacff4f7b2326e.tar.gz
go-03a4a5c98885245a99d67b684acacff4f7b2326e.zip
runtime: don't run TestCgoNumGoroutine on Windows or Plan 9
The test requires pthreads. Fixes #20666. Change-Id: Icb2400250a80cdad6680cd1ef6c18ef7343d5e29 Reviewed-on: https://go-review.googlesource.com/45701 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r--src/runtime/crash_cgo_test.go4
-rw-r--r--src/runtime/testdata/testprogcgo/numgoroutine.go2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go
index 70f1c1d16e..c102608748 100644
--- a/src/runtime/crash_cgo_test.go
+++ b/src/runtime/crash_cgo_test.go
@@ -397,6 +397,10 @@ func TestRaceSignal(t *testing.T) {
}
func TestCgoNumGoroutine(t *testing.T) {
+ switch runtime.GOOS {
+ case "windows", "plan9":
+ t.Skipf("skipping numgoroutine test on %s", runtime.GOOS)
+ }
t.Parallel()
got := runTestProg(t, "testprogcgo", "NumGoroutine")
want := "OK\n"
diff --git a/src/runtime/testdata/testprogcgo/numgoroutine.go b/src/runtime/testdata/testprogcgo/numgoroutine.go
index c1ac3eff8a..12fda49a13 100644
--- a/src/runtime/testdata/testprogcgo/numgoroutine.go
+++ b/src/runtime/testdata/testprogcgo/numgoroutine.go
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// +build !plan9,!windows
+
package main
/*