File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ mod test_signal;
1111 target_os = "macos" ,
1212 target_os = "netbsd" ) ) ]
1313mod test_aio;
14- #[ cfg( not( any ( target_os = "redox" ) ) ) ]
14+ #[ cfg( not( target_os = "redox" ) ) ]
1515mod test_mman;
1616#[ cfg( target_os = "linux" ) ]
1717mod test_signalfd;
Original file line number Diff line number Diff 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]
10371037fn 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}
You can’t perform that action at this time.
0 commit comments