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.TestSetuidEtc() fails in some container setups #46145
Comments
Conversation reference: https://groups.google.com/g/golang-nuts/c/dESUNUKCrbo/m/XpgcBFi3BQAJ |
Note that syscall_linux_test.go already has some tests that are only run by root, such as |
So, the issue is that the proc file is listing the supplementary groups in an unsorted order. This is not expected by the test.
I'll explore a little and see if I can reproduce this behavior. |
On my Chromebox linux-in-a-container, the
Further,
Which is clearly unsorted. On this system, the
The first example there is what the test is doing (which explains why the test passes for me and likely common container setups), but the second one suggests that, depending on the I think that explains what is going on. How to work around it is less clear. Yet more parsing of the status lines I guess... |
Indeed, as expected, making this modification to the test causes it to fail in my container:
|
root
(uid=0) should be able to run these tests
Change https://golang.org/cl/319591 mentions this issue: |
I've changed the title to reflect the fact that the bounding set observation in the description of this bug was, in fact, a red herring. |
I patched the additional test based on the fix-319591, I have applied the attached patch and all the tests passes on the container I am using. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, this build test is present at
HEAD
and in the go1.16 release branchWhat operating system and processor architecture are you using (
go env
)?All flavors of Linux
What did you do?
User ran
all.bash
in a non-default restrictive environment with a non-default bounding set.What did you expect to see?
Given the fact the test cannot run successfully in this environment, the test might better be skipped.
What did you see instead?
The text was updated successfully, but these errors were encountered: