X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=cmd%2Fsafcm-remote%2Fainsl%2Fainsl_test.go;h=8e9b0c121a268747d2a234dab0e1a045927fd55f;hb=583a2695a3ddc9c98e0a03d9f1bad8df30afe887;hp=2526dca0860da6685453c29e6e36e6d5dddfac98;hpb=304a68c565d58ae52dd39cf6e2d6ef52cada7d19;p=safcm%2Fsafcm.git diff --git a/cmd/safcm-remote/ainsl/ainsl_test.go b/cmd/safcm-remote/ainsl/ainsl_test.go index 2526dca..8e9b0c1 100644 --- a/cmd/safcm-remote/ainsl/ainsl_test.go +++ b/cmd/safcm-remote/ainsl/ainsl_test.go @@ -20,6 +20,7 @@ import ( "io/fs" "os" "path/filepath" + "runtime" "syscall" "testing" @@ -53,6 +54,12 @@ func TestHandle(t *testing.T) { } _, uid, _, gid := ft.CurrentUserAndGroup() + symlinkExists := "open file: too many levels of symbolic links" + if runtime.GOOS == "freebsd" { + // EMLINK instead of ELOOP + symlinkExists = "open file: too many links" + } + tests := []struct { name string path string @@ -268,7 +275,7 @@ func TestHandle(t *testing.T) { }, }, nil, - fmt.Errorf("open file: too many levels of symbolic links"), + fmt.Errorf(symlinkExists), }, { "exists: fifo",