-
Notifications
You must be signed in to change notification settings - Fork 177
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
Add tests for user id and group id #673
Conversation
The MacOS builds failed. I'll try and find out how travis does the setup for it. I don't have access to a Mac but i'd have expected these calls to work there. |
I don't have immediate access to a Mac I can try this on. However, looking at the tests, I think they need to be adjusted. It looks like all the tests use |
(Respectively, group id and user id for |
Ah i completely missed that i was using a user login name to retrieve groups. I've updated the tests to use group ids instead. The |
test/unix/test_lwt_unix.cppo.ml
Outdated
Lwt.return (pwuid = unix_pwuid) | ||
end; | ||
test "getgrgid and Unix.getgrgid" ~only_if:(fun () -> not Sys.win32) begin fun () -> | ||
let groups = Unix.getgroups () in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered Unix.getgid
instead? It looks like it should always return a gid for the test to use, so you don't have to have the pattern-matching below, and a fall-through case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use Unix.getgid
instead.
Happens to us all :) |
relates to #539 Signed-off-by: Anurag Soni <[email protected]>
Great, thanks for doing this :) |
relates to #539
Signed-off-by: Anurag Soni [email protected]