Skip to content

Commit 69e3a3a

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 46560c3 commit 69e3a3a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

unix/syscall_unix_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,8 @@ func TestFchmodat(t *testing.T) {
643643
didChmodSymlink := true
644644
err = unix.Fchmodat(unix.AT_FDCWD, "symlink1", uint32(mode), unix.AT_SYMLINK_NOFOLLOW)
645645
if err != nil {
646-
if (runtime.GOOS == "android" || runtime.GOOS == "linux" || runtime.GOOS == "solaris") && err == unix.EOPNOTSUPP {
646+
if (runtime.GOOS == "android" || runtime.GOOS == "linux" ||
647+
runtime.GOOS == "solaris" || runtime.GOOS == "illumos") && err == unix.EOPNOTSUPP {
647648
// Linux and Illumos don't support flags != 0
648649
didChmodSymlink = false
649650
} else {

0 commit comments

Comments
 (0)