diff options
author | Jakob Unterwurzacher | 2021-06-05 15:06:30 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-06-05 15:06:30 +0200 |
commit | e48f2377ec46f247d4db04cf8031702d0684c086 (patch) | |
tree | e73aaa369c4549c5289e4dcf099cce19fca0f64b /internal/syscallcompat/sys_common_test.go | |
parent | c0e75302166c9a166526586690086dcd16eff2c2 (diff) |
syscallcompat: drop obsolete wrappers
These are now available cross-platform in the unix
package.
Diffstat (limited to 'internal/syscallcompat/sys_common_test.go')
-rw-r--r-- | internal/syscallcompat/sys_common_test.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/syscallcompat/sys_common_test.go b/internal/syscallcompat/sys_common_test.go index c5f05a9..7141b92 100644 --- a/internal/syscallcompat/sys_common_test.go +++ b/internal/syscallcompat/sys_common_test.go @@ -230,8 +230,10 @@ func symlinkCheckMode(t *testing.T, st syscall.Stat_t) { } } +// We used to have our own wrapper for Symlinkat. The wrapper is gone but the test +// is still useful. func TestSymlinkat(t *testing.T) { - err := Symlinkat("/foo/bar/baz", tmpDirFd, "symlink1") + err := unix.Symlinkat("/foo/bar/baz", tmpDirFd, "symlink1") if err != nil { t.Fatal(err) } @@ -242,7 +244,7 @@ func TestSymlinkat(t *testing.T) { } symlinkCheckMode(t, st) // Test with absolute path - err = Symlinkat("/foo/bar/baz", -1, tmpDir+"/symlink2") + err = unix.Symlinkat("/foo/bar/baz", -1, tmpDir+"/symlink2") if err != nil { t.Fatal(err) } @@ -253,8 +255,10 @@ func TestSymlinkat(t *testing.T) { symlinkCheckMode(t, st) } +// We used to have our own wrapper for Mkdirat. The wrapper is gone but the test +// is still useful. func TestMkdirat(t *testing.T) { - err := Mkdirat(tmpDirFd, "mkdirat", 0700) + err := unix.Mkdirat(tmpDirFd, "mkdirat", 0700) if err != nil { t.Fatal(err) } @@ -266,7 +270,7 @@ func TestMkdirat(t *testing.T) { t.Fatalf("mkdirat did not create a directory") } // Test with absolute path - err = Mkdirat(-1, tmpDir+"/mkdirat2", 0700) + err = unix.Mkdirat(-1, tmpDir+"/mkdirat2", 0700) if err != nil { t.Fatal(err) } |