Skip to content

Commit 2768032

Browse files
author
Al Hoang
committed
haiku: update tests, remove extra any
1 parent 5351f49 commit 2768032

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

test/sys/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ mod test_signal;
1111
target_os = "macos",
1212
target_os = "netbsd"))]
1313
mod test_aio;
14-
#[cfg(not(any(target_os = "redox")))]
14+
#[cfg(not(target_os = "redox"))]
1515
mod test_mman;
1616
#[cfg(target_os = "linux")]
1717
mod test_signalfd;

test/test_unistd.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,11 +1032,17 @@ fn test_access_file_exists() {
10321032
assert!(access(&path, AccessFlags::R_OK | AccessFlags::W_OK).is_ok());
10331033
}
10341034

1035-
#[cfg(not(any(target_os = "redox", target_os = "haiku")))]
1035+
#[cfg(not(target_os = "redox"))]
10361036
#[test]
10371037
fn test_user_into_passwd() {
10381038
// get the UID of the "nobody" user
1039-
let nobody = User::from_name("nobody").unwrap().unwrap();
1039+
#[cfg(not(target_os = "haiku"))]
1040+
let test_username = "nobody";
1041+
// "nobody" unavailable on haiku
1042+
#[cfg(target_os = "haiku")]
1043+
let test_username = "user";
1044+
1045+
let nobody = User::from_name(test_username).unwrap().unwrap();
10401046
let pwd: libc::passwd = nobody.into();
10411047
let _: User = (&pwd).into();
10421048
}

0 commit comments

Comments
 (0)