aboutsummaryrefslogtreecommitdiff
path: root/internal/syscallcompat/emulate_test.go
diff options
context:
space:
mode:
authorSebastian Lackner2019-01-14 02:35:46 +0100
committerrfjakob2019-01-14 21:27:28 +0100
commit42bf6d1c68700a0d5d910c1be42088cc14125fec (patch)
treeccaaefec84822df3547ee8a33f7dc84b5518b6b6 /internal/syscallcompat/emulate_test.go
parentda557702d713e38a8c6c4c28275724c70988f919 (diff)
syscallcompat: Drop Renameat emulation on macOS.
Diffstat (limited to 'internal/syscallcompat/emulate_test.go')
-rw-r--r--internal/syscallcompat/emulate_test.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/internal/syscallcompat/emulate_test.go b/internal/syscallcompat/emulate_test.go
index 9b1994b..7d34c0c 100644
--- a/internal/syscallcompat/emulate_test.go
+++ b/internal/syscallcompat/emulate_test.go
@@ -9,43 +9,6 @@ import (
"golang.org/x/sys/unix"
)
-func TestEmulateRenameat(t *testing.T) {
- os.Mkdir(tmpDir+"/dir1", 0700)
- dir1, err := os.Open(tmpDir + "/dir1")
- if err != nil {
- t.Fatal(err)
- }
- defer dir1.Close()
- os.Mkdir(tmpDir+"/dir2", 0700)
- dir2, err := os.Open(tmpDir + "/dir2")
- if err != nil {
- t.Fatal(err)
- }
- defer dir2.Close()
- fd, err := os.Create(tmpDir + "/dir1/f1")
- if err != nil {
- t.Fatal(err)
- }
- fd.Close()
- err = emulateRenameat(int(dir1.Fd()), "f1", int(dir2.Fd()), "f2")
- if err != nil {
- t.Fatal(err)
- }
- _, err = os.Stat(tmpDir + "/dir2/f2")
- if err != nil {
- t.Fatal(err)
- }
- // Test with absolute path
- err = emulateRenameat(-1, tmpDir+"/dir2/f2", -1, tmpDir+"/dir2/f1")
- if err != nil {
- t.Fatal(err)
- }
- _, err = os.Stat(tmpDir + "/dir2/f1")
- if err != nil {
- t.Fatal(err)
- }
-}
-
func TestEmulateUnlinkat(t *testing.T) {
os.Mkdir(tmpDir+"/unlink1", 0700)
dirfd, err := os.Open(tmpDir + "/unlink1")