]> Cypherpunks repositories - gostls13.git/commitdiff
os: remove redundant GOOS checks in chown tests
authorTobias Klauser <tklauser@distanz.ch>
Thu, 30 Nov 2017 23:19:24 +0000 (00:19 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 30 Nov 2017 23:34:49 +0000 (23:34 +0000)
The build tags already prevent the tests from being run on windows or
plan9, so there is no need to check GOOS again.

Change-Id: I74d3c3b7756d9c50f6e5fd4c3e8b0db618fdebbb
Reviewed-on: https://go-review.googlesource.com/81295
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/os/os_unix_test.go

index e239835c6ac0d41d8e45e521d1ae6426d24994ea..56c885c66628d9490c8de021d4a1452635743cbe 100644 (file)
@@ -36,11 +36,6 @@ func checkUidGid(t *testing.T, path string, uid, gid int) {
 }
 
 func TestChown(t *testing.T) {
-       // Chown is not supported under windows or Plan 9.
-       // Plan9 provides a native ChownPlan9 version instead.
-       if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
-               t.Skipf("%s does not support syscall.Chown", runtime.GOOS)
-       }
        // Use TempDir() to make sure we're on a local file system,
        // so that the group ids returned by Getgroups will be allowed
        // on the file. On NFS, the Getgroups groups are
@@ -84,10 +79,6 @@ func TestChown(t *testing.T) {
 }
 
 func TestFileChown(t *testing.T) {
-       // Fchown is not supported under windows or Plan 9.
-       if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
-               t.Skipf("%s does not support syscall.Fchown", runtime.GOOS)
-       }
        // Use TempDir() to make sure we're on a local file system,
        // so that the group ids returned by Getgroups will be allowed
        // on the file. On NFS, the Getgroups groups are
@@ -131,10 +122,6 @@ func TestFileChown(t *testing.T) {
 }
 
 func TestLchown(t *testing.T) {
-       // Lchown is not supported under windows or Plan 9.
-       if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
-               t.Skipf("%s does not support syscall.Lchown", runtime.GOOS)
-       }
        // Use TempDir() to make sure we're on a local file system,
        // so that the group ids returned by Getgroups will be allowed
        // on the file. On NFS, the Getgroups groups are