@@ -163,7 +163,8 @@ fn test_mkfifoat() {
163163 mkfifoat ( Some ( dirfd) , mkfifoat_name, Mode :: S_IRUSR ) . unwrap ( ) ;
164164
165165 let stats =
166- stat:: fstatat ( dirfd, mkfifoat_name, fcntl:: AtFlags :: empty ( ) ) . unwrap ( ) ;
166+ stat:: fstatat ( Some ( dirfd) , mkfifoat_name, fcntl:: AtFlags :: empty ( ) )
167+ . unwrap ( ) ;
167168 let typ = stat:: SFlag :: from_bits_truncate ( stats. st_mode ) ;
168169 assert_eq ! ( typ, SFlag :: S_IFIFO ) ;
169170}
@@ -197,7 +198,7 @@ fn test_mkfifoat_directory() {
197198 let tempdir = tempdir ( ) . unwrap ( ) ;
198199 let dirfd = open ( tempdir. path ( ) , OFlag :: empty ( ) , Mode :: empty ( ) ) . unwrap ( ) ;
199200 let mkfifoat_dir = "mkfifoat_dir" ;
200- stat:: mkdirat ( dirfd, mkfifoat_dir, Mode :: S_IRUSR ) . unwrap ( ) ;
201+ stat:: mkdirat ( Some ( dirfd) , mkfifoat_dir, Mode :: S_IRUSR ) . unwrap ( ) ;
201202
202203 mkfifoat ( Some ( dirfd) , mkfifoat_dir, Mode :: S_IRUSR )
203204 . expect_err ( "assertion failed" ) ;
@@ -429,21 +430,21 @@ cfg_if! {
429430 if #[ cfg( target_os = "android" ) ] {
430431 use nix:: fcntl:: AtFlags ;
431432 execve_test_factory!( test_execveat_empty, execveat,
432- File :: open( "/system/bin/sh" ) . unwrap( ) . into_raw_fd( ) ,
433+ Some ( File :: open( "/system/bin/sh" ) . unwrap( ) . into_raw_fd( ) ) ,
433434 "" , AtFlags :: AT_EMPTY_PATH ) ;
434435 execve_test_factory!( test_execveat_relative, execveat,
435- File :: open( "/system/bin/" ) . unwrap( ) . into_raw_fd( ) ,
436+ Some ( File :: open( "/system/bin/" ) . unwrap( ) . into_raw_fd( ) ) ,
436437 "./sh" , AtFlags :: empty( ) ) ;
437438 execve_test_factory!( test_execveat_absolute, execveat,
438- File :: open( "/" ) . unwrap( ) . into_raw_fd( ) ,
439+ Some ( File :: open( "/" ) . unwrap( ) . into_raw_fd( ) ) ,
439440 "/system/bin/sh" , AtFlags :: empty( ) ) ;
440441 } else if #[ cfg( all( target_os = "linux" , any( target_arch ="x86_64" , target_arch ="x86" ) ) ) ] {
441442 use nix:: fcntl:: AtFlags ;
442- execve_test_factory!( test_execveat_empty, execveat, File :: open( "/bin/sh" ) . unwrap( ) . into_raw_fd( ) ,
443+ execve_test_factory!( test_execveat_empty, execveat, Some ( File :: open( "/bin/sh" ) . unwrap( ) . into_raw_fd( ) ) ,
443444 "" , AtFlags :: AT_EMPTY_PATH ) ;
444- execve_test_factory!( test_execveat_relative, execveat, File :: open( "/bin/" ) . unwrap( ) . into_raw_fd( ) ,
445+ execve_test_factory!( test_execveat_relative, execveat, Some ( File :: open( "/bin/" ) . unwrap( ) . into_raw_fd( ) ) ,
445446 "./sh" , AtFlags :: empty( ) ) ;
446- execve_test_factory!( test_execveat_absolute, execveat, File :: open( "/" ) . unwrap( ) . into_raw_fd( ) ,
447+ execve_test_factory!( test_execveat_absolute, execveat, Some ( File :: open( "/" ) . unwrap( ) . into_raw_fd( ) ) ,
447448 "/bin/sh" , AtFlags :: empty( ) ) ;
448449 }
449450}
0 commit comments