Commit 45c57e59 authored by Tobias Klauser's avatar Tobias Klauser Committed by Brad Fitzpatrick

os: remove redundant GOOS checks in chown tests

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent eb97160f
...@@ -36,11 +36,6 @@ func checkUidGid(t *testing.T, path string, uid, gid int) { ...@@ -36,11 +36,6 @@ func checkUidGid(t *testing.T, path string, uid, gid int) {
} }
func TestChown(t *testing.T) { 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, // Use TempDir() to make sure we're on a local file system,
// so that the group ids returned by Getgroups will be allowed // so that the group ids returned by Getgroups will be allowed
// on the file. On NFS, the Getgroups groups are // on the file. On NFS, the Getgroups groups are
...@@ -84,10 +79,6 @@ func TestChown(t *testing.T) { ...@@ -84,10 +79,6 @@ func TestChown(t *testing.T) {
} }
func TestFileChown(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, // Use TempDir() to make sure we're on a local file system,
// so that the group ids returned by Getgroups will be allowed // so that the group ids returned by Getgroups will be allowed
// on the file. On NFS, the Getgroups groups are // on the file. On NFS, the Getgroups groups are
...@@ -131,10 +122,6 @@ func TestFileChown(t *testing.T) { ...@@ -131,10 +122,6 @@ func TestFileChown(t *testing.T) {
} }
func TestLchown(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, // Use TempDir() to make sure we're on a local file system,
// so that the group ids returned by Getgroups will be allowed // so that the group ids returned by Getgroups will be allowed
// on the file. On NFS, the Getgroups groups are // on the file. On NFS, the Getgroups groups are
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment