aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-02-28 20:40:08 +0100
committerJakob Unterwurzacher2018-02-28 20:40:08 +0100
commitc5243fc79e25cd589e78f47dafe0e8144885e6e4 (patch)
tree62896cff49e62941fcf0eb4503abc06d2e255a58 /internal
parent90f2fea7fba8cd2cab1c28471f955a99f91ca0ad (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')
-rw-r--r--internal/syscallcompat/sys_common_test.go6
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")