MacOS: don't test symlinks longer than 1000 bytes
The limit is much lower than on Linux. https://github.com/rfjakob/gocryptfs/issues/213
This commit is contained in:
parent
90f2fea7fb
commit
c5243fc79e
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user