aboutsummaryrefslogtreecommitdiff
path: root/tests/reverse/correctness_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-03-05 21:23:57 +0100
committerJakob Unterwurzacher2018-03-05 21:23:57 +0100
commitb820fa691ddae7b3111de823c8a45666f9e59c70 (patch)
tree7d799e0ac9379e6d41e56be9803073125a3fd4bd /tests/reverse/correctness_test.go
parent7db5395c5346a1b32656b27e504417779435edc8 (diff)
macos: adjust TestTooLongSymlink length for darwin
Limit is much lower than on linux
Diffstat (limited to 'tests/reverse/correctness_test.go')
-rw-r--r--tests/reverse/correctness_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/reverse/correctness_test.go b/tests/reverse/correctness_test.go
index 15eb18b..214c747 100644
--- a/tests/reverse/correctness_test.go
+++ b/tests/reverse/correctness_test.go
@@ -5,6 +5,7 @@ import (
"fmt"
"io/ioutil"
"os"
+ "runtime"
"syscall"
"testing"
@@ -185,8 +186,12 @@ func TestEnoent(t *testing.T) {
// returning an I/O error to the user.
// https://github.com/rfjakob/gocryptfs/issues/167
func TestTooLongSymlink(t *testing.T) {
+ l := 4000
+ if runtime.GOOS == "darwin" {
+ l = 1000 // max length is much lower on darwin
+ }
fn := dirA + "/TooLongSymlink"
- target := string(bytes.Repeat([]byte("x"), 4000))
+ target := string(bytes.Repeat([]byte("x"), l))
err := os.Symlink(target, fn)
if err != nil {
t.Fatal(err)