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

syscall: Non-root Unix build fails after commit 055ecb7be580 in TestSCMCredentials #10703

Closed
siebenmann opened this issue May 5, 2015 · 2 comments
Milestone

Comments

@siebenmann
Copy link

If I build current git master at or after commit 055ecb7, it fails:

--- FAIL: TestSCMCredentials (0.00s)
        creds_test.go:60: WriteMsgUnix failed with write unix @-><nil>: sendmsg: operation not permitted, want EPERM

This is src/syscall/creds_test.go, which contains code that assumes a net.OpError.Err field is directly a syscall.EPERM:

if err.(*net.OpError).Err != syscall.EPERM { .... }

This assumption is false after the commit. Now the syscall.EPERM is now wrapped up inside a SyscallError that's the result of calling os.NewSyscallError() in src/net/fd_unix.go's writeMsg().

The entire test here is conditional on os.Getuid() not being 0. I assume that the buildbots are running in some environment where os.Getuid() returns 0, which means this entire subtest in TestSCMCredentials() is being skipped. That may be a bug in itself (and there are a number of other tests that are conditional on the UID not being seen as 0).

@ALTree
Copy link
Member

ALTree commented May 5, 2015

There's a pending CL for this https://go-review.googlesource.com/#/c/9714/

@gopherbot
Copy link

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

@mikioh mikioh closed this as completed in fe3446b May 6, 2015
@mikioh mikioh changed the title Non-root Unix build fails after commit 055ecb7be580 in TestSCMCredentials syscall: Non-root Unix build fails after commit 055ecb7be580 in TestSCMCredentials May 6, 2015
@mikioh mikioh added this to the Go1.5 milestone May 6, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants