-
Notifications
You must be signed in to change notification settings - Fork 18k
os/user: user_test.go fails incorrectly; does not expect membership in group "5000" (OSX/darwin) #14806
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
Comments
I don't follow what you did when you wrote:
What is the following output? |
Sent https://go-review.googlesource.com/20642 for the error formatting at least. |
CL https://golang.org/cl/20642 mentions this issue. |
"groups" is a command on OSX. The output that follows is a list of the groups I am in, with some of the employer-specific ones elided with "...". For whatever reason, I seem to be in group 5000 on my laptop. The test either needs to run in a more controlled environment, or be more tolerant of apparently peculiar environments. |
What did you do to add yourself to such a group, though? |
there seems to be more needed than just a group with a numeric name: whats the output of (e.g. to see the groupid): |
|
It was failing like "unknown groupid ᎈ|" instead of "unknown groupid 5000" due to the conversion from int to string. Updates #14806 Change-Id: I83e4b478ff628ad4053573a9f32b3fadce22e847 Reviewed-on: https://go-review.googlesource.com/20642 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
For grins:
I have no idea what/why/how, I try not to do a lot of hacking at my laptop's configuration. |
"What did you do to add yourself to such a group, though?"
My account was apparently born that way. |
I am having a similar issue. Go at tip used to pass all tests. Now it fails with the following: --- FAIL: TestLookupGroup (0.00s) |
@dr2chase Odd. I was also testing on a Google-issued darwin laptop. :) The test may need to be removed. As identified here, it fails in misconfigured environments where a user is not a part of their primary group. Unfortunately, I don't think there's a cross-platform way to make this test hermetic. However, the underlying @bradfitz Should I go ahead and move all platforms to the /etc/group fallback? Seems more reliable than all the woes that my CL has introduced. Sorry that this has created so much noise. For both of you, it would be helpful to know the number of supplementary groups your user is a part of -- is it greater than 256? |
@zombiezen It returns 116 for me dscl . list /groups|wc -l |
For me:
|
@zombiezen, /etc/group fallback sounds good if you'd like. But only if it's actually a fallback; we should probably still try using C first. I'll leave it up to you as to how to change the tests. |
Please answer these questions before submitting your issue. Thanks!
go version
)?go env
)?Checkout clean from tip, ./make.bash.
Ensure that "groups" includes a numeric group, e.g.:
That ./all.bash on a newly checked out top would pass clean with no errors.
The text was updated successfully, but these errors were encountered: