Skip to content

Commit

Permalink
test_unistd: Expand comments for skipping tests if not root
Browse files Browse the repository at this point in the history
  • Loading branch information
JayH5 committed Aug 26, 2017
1 parent ee47afe commit 4a3ba28
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ mod linux_android {
#[test]
#[cfg(not(any(target_os = "ios", target_os = "macos")))]
fn test_setgroups() {
// Skip this test when not run as root as `setgroups()` requires root.
if !Uid::current().is_root() {
// setgroups() requires root
return
}

Expand All @@ -129,8 +129,9 @@ fn test_setgroups() {
#[test]
#[cfg(not(any(target_os = "ios", target_os = "macos")))]
fn test_initgroups() {
// Skip this test when not run as root as `initgroups()` and `setgroups()`
// require root.
if !Uid::current().is_root() {
// initgroups(), setgroups() require root
return
}

Expand Down

0 comments on commit 4a3ba28

Please sign in to comment.