From 69e3a3a65b5bed52b8194d33c59d955757d87523 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 31 May 2019 15:04:40 +0200 Subject: [PATCH] unix: fix TestFchmodat on illumos Like linux/android, illumos doesn't support Fchmodat flags != 0. The comment already mentions this, so update the condition as well now that GOOS illumos is known. Change-Id: Ic6542223129ec5fd8bb56dab3c8a042dc29ec7cc Reviewed-on: https://go-review.googlesource.com/c/sys/+/179362 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- unix/syscall_unix_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unix/syscall_unix_test.go b/unix/syscall_unix_test.go index 0d1c87ce..d01964bd 100644 --- a/unix/syscall_unix_test.go +++ b/unix/syscall_unix_test.go @@ -643,7 +643,8 @@ func TestFchmodat(t *testing.T) { didChmodSymlink := true err = unix.Fchmodat(unix.AT_FDCWD, "symlink1", uint32(mode), unix.AT_SYMLINK_NOFOLLOW) if err != nil { - if (runtime.GOOS == "android" || runtime.GOOS == "linux" || runtime.GOOS == "solaris") && err == unix.EOPNOTSUPP { + if (runtime.GOOS == "android" || runtime.GOOS == "linux" || + runtime.GOOS == "solaris" || runtime.GOOS == "illumos") && err == unix.EOPNOTSUPP { // Linux and Illumos don't support flags != 0 didChmodSymlink = false } else {