diff options
author | Sebastian Lackner | 2019-01-14 02:32:28 +0100 |
---|---|---|
committer | rfjakob | 2019-01-14 21:27:28 +0100 |
commit | da557702d713e38a8c6c4c28275724c70988f919 (patch) | |
tree | 615a8c9487b52c18d74bed29defd03d03c933743 /internal/syscallcompat/emulate_test.go | |
parent | d7be76685128cb2cdca01becd856ea57cc18ef34 (diff) |
syscallcompat: Drop Openat emulation on macOS.
Diffstat (limited to 'internal/syscallcompat/emulate_test.go')
-rw-r--r-- | internal/syscallcompat/emulate_test.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/internal/syscallcompat/emulate_test.go b/internal/syscallcompat/emulate_test.go index 2cf2698..9b1994b 100644 --- a/internal/syscallcompat/emulate_test.go +++ b/internal/syscallcompat/emulate_test.go @@ -9,35 +9,6 @@ import ( "golang.org/x/sys/unix" ) -func TestEmulateOpenat(t *testing.T) { - _, err := emulateOpenat(tmpDirFd, "testOpenAt", 0, 0) - if err == nil { - t.Errorf("should have failed") - } - fd, err := os.Create(tmpDir + "/testOpenAt") - if err != nil { - t.Fatal(err) - } - fd.Close() - rawFd, err := emulateOpenat(tmpDirFd, "testOpenAt", 0, 0) - if err != nil { - t.Fatal(err) - } - defer syscall.Close(rawFd) - if rawFd < 0 { - t.Fatalf("rawFd=%d", rawFd) - } - // Test with absolute path - rawFd, err = emulateOpenat(-1, tmpDir+"/testOpenAt", 0, 0) - if err != nil { - t.Fatal(err) - } - defer syscall.Close(rawFd) - if rawFd < 0 { - t.Fatalf("rawFd=%d", rawFd) - } -} - func TestEmulateRenameat(t *testing.T) { os.Mkdir(tmpDir+"/dir1", 0700) dir1, err := os.Open(tmpDir + "/dir1") |