Преглед изворни кода

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 <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Tobias Klauser пре 6 година
родитељ
комит
69e3a3a65b
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      unix/syscall_unix_test.go

+ 2 - 1
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 {