1
0
mirror of https://github.com/golang/go synced 2024-11-12 09:50:21 -07:00

archive/tar: make test pass on setgid dirs

Fixes #4867

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/7382045
This commit is contained in:
Brad Fitzpatrick 2013-02-21 14:00:03 -08:00
parent f466617a62
commit 4335e69af6

View File

@ -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 {