]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: disable test that forks on darwin/arm
authorDavid Crawshaw <crawshaw@golang.org>
Mon, 23 Mar 2015 16:40:00 +0000 (12:40 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Mon, 23 Mar 2015 17:17:07 +0000 (17:17 +0000)
This test was introduced in cl/5130 and broke the darwin/arm builder.

Also check some errors, which was making the failure hard to decipher.

Change-Id: Ifb1d60b9971782cf8d2e979d83f8a81249d7ee9b
Reviewed-on: https://go-review.googlesource.com/7932
Reviewed-by: Rob Pike <r@golang.org>
src/syscall/exec_unix_test.go

index 6b942fc4acc94f7a44c353c2ce9fff45a77c02f1..954d9aa26f2650e4c9acdaf4f1effdf429e767bd 100644 (file)
@@ -11,6 +11,7 @@ import (
        "os"
        "os/exec"
        "os/signal"
+       "runtime"
        "syscall"
        "testing"
        "unsafe"
@@ -34,15 +35,22 @@ func (c *command) Info() (pid, pgrp int) {
 }
 
 func (c *command) Start() {
-       c.proc.Start()
+       if err := c.proc.Start(); err != nil {
+               c.test.Fatal(err)
+       }
 }
 
 func (c *command) Stop() {
        c.pipe.Close()
-       c.proc.Wait()
+       if err := c.proc.Wait(); err != nil {
+               c.test.Fatal(err)
+       }
 }
 
 func create(t *testing.T) *command {
+       if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
+               t.Skipf("skipping on %s/%s, cannot fork", runtime.GOOS, runtime.GOARCH)
+       }
        proc := exec.Command("cat")
        stdin, err := proc.StdinPipe()
        if err != nil {