Commit 703ad412 authored by Nick Mathewson's avatar Nick Mathewson 🦞
Browse files

Work around CI config weirdness.

Some of our builders put root into gid 0, but getgroups() doesn't
actually give any result.
parent 85d7084d
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -94,6 +94,11 @@ mod test {
    fn groups() {
    fn groups() {
        let groups = cur_groups();
        let groups = cur_groups();
        let cur_gid = users::get_current_gid();
        let cur_gid = users::get_current_gid();
        if groups.is_empty() {
            // Some container/VM setups forget to put the (root) user into any
            // groups at all.
            return;
        }
        assert!(groups.contains(&cur_gid));
        assert!(groups.contains(&cur_gid));
    }
    }