aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2013-02-21 14:00:03 -0800
committerBrad Fitzpatrick <bradfitz@golang.org>2013-02-21 14:00:03 -0800
commit4335e69af64b96cd69fa876c5157d6caebde23a6 (patch)
treec6410af9723d5fb43fcd380bbae2c3980d70c2e3 /src
parentf466617a620ce98a7a6a84f51621458641a0c38f (diff)
downloadgo-4335e69af64b96cd69fa876c5157d6caebde23a6.tar.xz
archive/tar: make test pass on setgid dirs
Fixes #4867 R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/7382045
Diffstat (limited to 'src')
-rw-r--r--src/pkg/archive/tar/tar_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/archive/tar/tar_test.go b/src/pkg/archive/tar/tar_test.go
index 7d88716de8..b55cc2c613 100644
--- a/src/pkg/archive/tar/tar_test.go
+++ b/src/pkg/archive/tar/tar_test.go
@@ -48,7 +48,8 @@ func TestFileInfoHeaderDir(t *testing.T) {
if g, e := h.Name, "testdata/"; g != e {
t.Errorf("Name = %q; want %q", g, e)
}
- if g, e := h.Mode, int64(fi.Mode().Perm())|c_ISDIR; g != e {
+ const setsid = 02000 // see golang.org/issue/4867
+ if g, e := h.Mode&^setsid, int64(fi.Mode().Perm())|c_ISDIR; g != e {
t.Errorf("Mode = %#o; want %#o", g, e)
}
if g, e := h.Size, int64(0); g != e {