-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/build: failing test in x/sys/unix since Linux builder update #25354
Comments
Change https://golang.org/cl/107935 mentions this issue: |
The test tries to send a message to its PID minus one and expect it to not have permissions? But we're root now (unlike our fake root in Kubernetes before), so we do have permissions, but the PID-minus-one just doesn't exist? var ucred unix.Ucred
ucred.Pid = int32(os.Getpid() - 1)
ucred.Uid = uint32(os.Getuid())
ucred.Gid = uint32(os.Getgid())
oob := unix.UnixCredentials(&ucred)
_, _, err = cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
if op, ok := err.(*net.OpError); ok {
err = op.Err
}
if sys, ok := err.(*os.SyscallError); ok {
err = sys.Err
}
if err != syscall.EPERM {
t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
} |
@hugelgupf, can you help us fix this failing test? We moved Go's builders from Kubernetes pods to privileged Docker containers under GCE Contained-Optimized OS and now there are behavior differences in this test you added in golang/sys@f67933e Thanks! |
Now that you are root, the test is somewhat moot. Both before and after I made that change, you were looking to elicit You could add some logic where you spawn a new thread, lock it to an OS thread, drop capabilities and change user ID (just on the thread by doing My 2c: just delete it. |
Change https://golang.org/cl/112738 mentions this issue: |
@hugelgupf, SGTM. I sent https://go-review.googlesource.com/#/c/sys/+/112738 ... care to review? |
TestSCMCredentials in
golang.org/x/sys/unix
fails on all linux builders:https://build.golang.org/log/e3c1adc5394f1c8d24cf8eaffaac90b69105cccf
https://build.golang.org/log/221593d098a3343a7249689138ae3db458909cc4
https://build.golang.org/log/d03f8c8aa75e69e86d3527fe263ac16e6a291a1a
It already failed during the trybot runs for https://golang.org/cl/112696 but the CL is unrelated to the failing
TestSCMCredentials
.Presumably this is caused by the recent Linux builder changes regarding #25108?
/cc @bradfitz
The text was updated successfully, but these errors were encountered: