Commit 985893ac authored by Mikio Hara's avatar Mikio Hara

syscall: fix build

R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/54000043
parent 3baa98f2
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment