Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: TestGoBuildUmask fails when source tree has a POSIX ACL set #17909

Closed
zhengkai opened this issue Nov 14, 2016 · 3 comments
Closed

cmd/go: TestGoBuildUmask fails when source tree has a POSIX ACL set #17909

zhengkai opened this issue Nov 14, 2016 · 3 comments
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@zhengkai
Copy link

summary

when using POSIX ACL in go source dir, test fail

--- FAIL: TestGoBuildUmask (0.06s)
    go_test.go:252: running testgo [build /tmp/gotest237673041/x.go]
    go_unix_test.go:29: wrote x with mode=-rwxrwxr-x, wanted no 0077 bits

I think the test confuses the differences between the original and the extra permissions

detail

system is Ubuntu 16.04.1 x64

my /usr/local/src dir had been set POSIX ACL sudo group write

sudo setfacl -d -R -m g:sudo:rwx /usr/local/src
sudo setfacl    -R -m g:sudo:rwX /usr/local/src

and my account in sudo group

 » id
uid=1000(zhengkai) gid=1000(zhengkai) groups=1000(zhengkai),4(adm),27(sudo)

getfacl shows:

 » getfacl /usr/local/src
getfacl: Removing leading '/' from absolute path names
# file: usr/local/src
# owner: root
# group: root
user::rwx
group::r-x
group:sudo:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::r-x
default:group:sudo:rwx
default:mask::rwx
default:other::r-x

I download the newest binary https://storage.googleapis.com/golang/go1.7.3.linux-amd64.tar.gz for build, extract files to /usr/local/src/gobin1.7.3

and clone source

git clone https://go.googlesource.com/go /usr/local/src/go

goto src dir and build ( commit: 2f76c198 )

GOROOT_BOOTSTRAP=/usr/local/src/gobin1.7.3 ./all.bash

fail:

ok      cmd/doc 0.036s
ok      cmd/fix 0.021s
--- FAIL: TestGoBuildUmask (0.06s)
    go_test.go:252: running testgo [build /tmp/gotest237673041/x.go]
    go_unix_test.go:29: wrote x with mode=-rwxrwxr-x, wanted no 0077 bits
FAIL
FAIL    cmd/go  28.873s
ok      cmd/gofmt   0.018s
ok      cmd/internal/goobj  0.014s
ok      cmd/internal/obj    0.002s
ok      cmd/internal/obj/x86    0.002s
ok      cmd/link    0.016s
ok      cmd/nm  0.507s
ok      cmd/objdump 0.813s
ok      cmd/pack    1.016s
ok      cmd/trace   0.004s
ok      cmd/vendor/golang.org/x/arch/arm/armasm 0.004s
ok      cmd/vendor/golang.org/x/arch/ppc64/ppc64asm 0.016s
ok      cmd/vendor/golang.org/x/arch/x86/x86asm 0.110s
ok      cmd/vet 1.246s
ok      cmd/vet/internal/cfg    0.016s
2016/11/14 14:39:38 Failed: exit status 1

if I remove the POSIX ACL settings, everything will be ok

sudo setfacl -b -R /usr/local/src/go

I think the test confuses the differences between the original and the extra permissions

@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 16, 2016
@quentinmit quentinmit added this to the Go1.9Maybe milestone Nov 16, 2016
@quentinmit quentinmit changed the title Go test fail when using POSIX ACL, newest master cmd/go: TestGoBuildUmask fails when source tree has a POSIX ACL set Nov 16, 2016
@bradfitz bradfitz added help wanted Testing An issue that has been verified to require only test changes, not just a test failure. labels Jul 20, 2017
@bradfitz
Copy link
Contributor

@jessfraz, this seems up your alley?

@jessfraz
Copy link
Contributor

Sweeet on it

@gopherbot
Copy link

CL https://golang.org/cl/50370 mentions this issue.

@bradfitz bradfitz modified the milestones: Go1.10, Go1.9Maybe Jul 20, 2017
@golang golang locked and limited conversation to collaborators Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

5 participants