mirror of
https://github.com/golang/go
synced 2024-11-23 21:40:05 -07:00
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: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
eb97160f46
commit
45c57e5907
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user