summaryrefslogtreecommitdiff
path: root/tests/sharedstorage/sharedstorage_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-12-08 18:49:21 +0100
committerJakob Unterwurzacher2021-12-08 18:49:21 +0100
commit7d60315cd53080e223051a4f16eb3ace3b86e095 (patch)
treeb64657c619a23c90c48d788b0c7fcbd7ac16b157 /tests/sharedstorage/sharedstorage_test.go
parentde22cb1e5dfba8f8b97a5da671bfb2b1a845afb7 (diff)
tests: convert Creat() calls to Open()
Creat() is equivalent to Open(..., O_CREAT|O_WRONLY|O_TRUNC, ...) and MacOS does not have syscall.Creat(). https://github.com/rfjakob/gocryptfs/issues/623
Diffstat (limited to 'tests/sharedstorage/sharedstorage_test.go')
-rw-r--r--tests/sharedstorage/sharedstorage_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/sharedstorage/sharedstorage_test.go b/tests/sharedstorage/sharedstorage_test.go
index a08deed..88f3304 100644
--- a/tests/sharedstorage/sharedstorage_test.go
+++ b/tests/sharedstorage/sharedstorage_test.go
@@ -77,7 +77,7 @@ func TestDirUnlink(t *testing.T) {
if err := unix.Rmdir(tc.mnt2 + "/foo"); err != nil {
t.Fatal(err)
}
- if fd, err := unix.Creat(tc.mnt2+"/foo", 0600); err != nil {
+ if fd, err := unix.Open(tc.mnt2+"/foo", unix.O_CREAT|unix.O_WRONLY|unix.O_TRUNC, 0600); err != nil {
t.Fatal(err)
} else {
unix.Close(fd)
@@ -104,7 +104,7 @@ func TestStaleHardlinks(t *testing.T) {
defer tc.cleanup()
link0 := tc.mnt1 + "/link0"
- if fd, err := unix.Creat(link0, 0600); err != nil {
+ if fd, err := unix.Open(link0, unix.O_CREAT|unix.O_WRONLY|unix.O_TRUNC, 0600); err != nil {
t.Fatal(err)
} else {
unix.Close(fd)