We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f129095 commit e046897Copy full SHA for e046897
test/test_unistd.rs
@@ -313,12 +313,15 @@ fn test_initgroups() {
313
// groups that the user belongs to are also set.
314
let user = CString::new("root").unwrap();
315
let group = Gid::from_raw(123);
316
- let group_list = getgrouplist(&user, group).unwrap();
+ let mut group_list = getgrouplist(&user, group).unwrap();
317
assert!(group_list.contains(&group));
318
319
initgroups(&user, group).unwrap();
320
321
- let new_groups = getgroups().unwrap();
+ let mut new_groups = getgroups().unwrap();
322
+
323
+ new_groups.sort_by_key(|gid| gid.as_raw());
324
+ group_list.sort_by_key(|gid| gid.as_raw());
325
assert_eq!(new_groups, group_list);
326
327
// Revert back to the old groups
0 commit comments