diff options
author | Jakob Unterwurzacher | 2018-02-28 20:40:08 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2018-02-28 20:40:08 +0100 |
commit | c5243fc79e25cd589e78f47dafe0e8144885e6e4 (patch) | |
tree | 62896cff49e62941fcf0eb4503abc06d2e255a58 /internal/syscallcompat | |
parent | 90f2fea7fba8cd2cab1c28471f955a99f91ca0ad (diff) |
MacOS: don't test symlinks longer than 1000 bytes
The limit is much lower than on Linux.
https://github.com/rfjakob/gocryptfs/issues/213
Diffstat (limited to 'internal/syscallcompat')
-rw-r--r-- | internal/syscallcompat/sys_common_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/syscallcompat/sys_common_test.go b/internal/syscallcompat/sys_common_test.go index bc694ba..17268e4 100644 --- a/internal/syscallcompat/sys_common_test.go +++ b/internal/syscallcompat/sys_common_test.go @@ -3,6 +3,7 @@ package syscallcompat import ( "bytes" "os" + "runtime" "syscall" "testing" ) @@ -12,6 +13,11 @@ func TestReadlinkat(t *testing.T) { target := string(bytes.Repeat([]byte("x"), targetLen)) err := os.Symlink(target, tmpDir+"/readlinkat") if err != nil { + if targetLen > 1000 && runtime.GOOS == "darwin" { + // Symlinks longer than 1024 (?) bytes are not supported on + // MacOS + continue + } t.Fatal(err) } target2, err := Readlinkat(tmpDirFd, "readlinkat") |