From: Mikio Hara Date: Sat, 18 Jan 2014 02:22:32 +0000 (+0900) Subject: syscall: fix build X-Git-Tag: go1.3beta1~935 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=985893acffc811034b24c0462a8766fbf06b1d3d;p=gostls13.git syscall: fix build R=golang-codereviews, iant CC=golang-codereviews https://golang.org/cl/54000043 --- diff --git a/src/pkg/syscall/rlimit_unix_test.go b/src/pkg/syscall/rlimit_unix_test.go index b96c4bb996..e84d62ad6f 100644 --- a/src/pkg/syscall/rlimit_unix_test.go +++ b/src/pkg/syscall/rlimit_unix_test.go @@ -7,6 +7,7 @@ package syscall_test import ( + "runtime" "syscall" "testing" ) @@ -34,7 +35,14 @@ func TestRlimit(t *testing.T) { set = rlimit set.Cur = set.Max - 1 if set != get { - t.Fatalf("Rlimit: change failed: wanted %#v got %#v", set, get) + // Seems like Darwin requires some privilege to + // increse the soft limit of rlimit sandbox, though + // Setrlimit never reports error. + switch runtime.GOOS { + case "darwin": + default: + t.Fatalf("Rlimit: change failed: wanted %#v got %#v", set, get) + } } err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rlimit) if err != nil {