summaryrefslogtreecommitdiff
path: root/test/test_unistd.rs
diff options
context:
space:
mode:
authorRyan Zoeller <rtzoeller@rtzoeller.com>2022-01-03 04:25:47 -0600
committerRyan Zoeller <rtzoeller@rtzoeller.com>2022-01-10 20:14:34 -0600
commit1b32230831542f060d14b2ad31baf119277f8739 (patch)
tree0ccb135eecfefa3767098c8e1f666c6fdcd585ca /test/test_unistd.rs
parentf6268d984489f0304565cf996e3d9396da540a0a (diff)
downloadnix-1b32230831542f060d14b2ad31baf119277f8739.zip
Add getresuid/gid and setresuid/gid on BSDs
Diffstat (limited to 'test/test_unistd.rs')
-rw-r--r--test/test_unistd.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/test_unistd.rs b/test/test_unistd.rs
index 59ab24e4..0f56b929 100644
--- a/test/test_unistd.rs
+++ b/test/test_unistd.rs
@@ -621,7 +621,11 @@ fn test_sysconf_unsupported() {
}
-#[cfg(any(target_os = "android", target_os = "linux"))]
+#[cfg(any(target_os = "android",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "linux",
+ target_os = "openbsd"))]
#[test]
fn test_getresuid() {
let resuids = getresuid().unwrap();
@@ -630,7 +634,11 @@ fn test_getresuid() {
assert!(resuids.saved.as_raw() != libc::uid_t::max_value());
}
-#[cfg(any(target_os = "android", target_os = "linux"))]
+#[cfg(any(target_os = "android",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "linux",
+ target_os = "openbsd"))]
#[test]
fn test_getresgid() {
let resgids = getresgid().unwrap();