From c0d48836eced2571222f49d78a27955da49590fb Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Sat, 11 Apr 2015 19:25:45 -0400 Subject: [PATCH] net/http/cgi: skip fork test on darwin/arm64 Just like darwin/arm. Change-Id: Ib9a32bb0aed5f08b27de11a93aaf273cacdf5779 Reviewed-on: https://go-review.googlesource.com/8819 Reviewed-by: Minux Ma --- src/net/http/cgi/matryoshka_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/net/http/cgi/matryoshka_test.go b/src/net/http/cgi/matryoshka_test.go index bf28c5625b..c89c6d525e 100644 --- a/src/net/http/cgi/matryoshka_test.go +++ b/src/net/http/cgi/matryoshka_test.go @@ -21,10 +21,13 @@ import ( "time" ) +// iOS cannot fork, so we skip some tests +var iOS = runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") + // This test is a CGI host (testing host.go) that runs its own binary // as a child process testing the other half of CGI (child.go). func TestHostingOurselves(t *testing.T) { - if runtime.GOOS == "nacl" || (runtime.GOOS == "darwin" && runtime.GOARCH == "arm") { + if runtime.GOOS == "nacl" || iOS { t.Skipf("skipping on %s/%s", runtime.GOOS, runtime.GOARCH) } @@ -93,7 +96,7 @@ func (w *limitWriter) Write(p []byte) (n int, err error) { // If there's an error copying the child's output to the parent, test // that we kill the child. func TestKillChildAfterCopyError(t *testing.T) { - if runtime.GOOS == "nacl" || (runtime.GOOS == "darwin" && runtime.GOARCH == "arm") { + if runtime.GOOS == "nacl" || iOS { t.Skipf("skipping on %s/%s", runtime.GOOS, runtime.GOARCH) } @@ -140,7 +143,7 @@ func TestKillChildAfterCopyError(t *testing.T) { // Test that a child handler writing only headers works. // golang.org/issue/7196 func TestChildOnlyHeaders(t *testing.T) { - if runtime.GOOS == "nacl" || (runtime.GOOS == "darwin" && runtime.GOARCH == "arm") { + if runtime.GOOS == "nacl" || iOS { t.Skipf("skipping on %s/%s", runtime.GOOS, runtime.GOARCH) }