1010use platform:: { self , OsIpcChannel , OsIpcReceiverSet } ;
1111use platform:: { OsIpcSharedMemory } ;
1212use std:: collections:: HashMap ;
13- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = " android") ) ) ]
13+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
1414use std:: process:: { Command , Stdio } ;
1515use std:: sync:: Arc ;
1616use std:: time:: { Duration , Instant } ;
1717use std:: thread;
18- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = " android") ) ) ]
18+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
1919use std:: env;
2020
21- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = " android") ) ) ]
21+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
2222use libc;
2323use platform:: { OsIpcSender , OsIpcOneShotServer } ;
2424#[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = "android" ) ) ) ]
@@ -215,7 +215,8 @@ fn with_n_fds(n: usize, size: usize) {
215215
216216// These tests only apply to platforms that need fragmentation.
217217#[ cfg( all( not( feature = "force-inprocess" ) , any( target_os = "linux" ,
218- target_os = "freebsd" ) ) ) ]
218+ target_os = "freebsd" ,
219+ target_os = "windows" ) ) ) ]
219220mod fragment_tests {
220221 use platform;
221222 use super :: with_n_fds;
@@ -666,7 +667,7 @@ fn server_connect_first() {
666667// Note! This test is actually used by the cross_process_spawn() test
667668// below as a second process. Running it by itself is meaningless, but
668669// passes.
669- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = " android") ) ) ]
670+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
670671#[ test]
671672#[ ignore]
672673fn cross_process_server ( )
@@ -682,7 +683,7 @@ fn cross_process_server()
682683 unsafe { libc:: exit ( 0 ) ; }
683684}
684685
685- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = " android") ) ) ]
686+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
686687#[ test]
687688fn cross_process_spawn ( ) {
688689 let ( server, name) = OsIpcOneShotServer :: new ( ) . unwrap ( ) ;
@@ -726,7 +727,7 @@ fn cross_process_fork() {
726727// Note! This test is actually used by the cross_process_sender_transfer_spawn() test
727728// below as a second process. Running it by itself is meaningless, but
728729// passes.
729- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = " android") ) ) ]
730+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
730731#[ test]
731732#[ ignore]
732733fn cross_process_sender_transfer_server ( )
@@ -746,7 +747,7 @@ fn cross_process_sender_transfer_server()
746747 unsafe { libc:: exit ( 0 ) ; }
747748}
748749
749- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = " android") ) ) ]
750+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
750751#[ test]
751752fn cross_process_sender_transfer_spawn ( ) {
752753 let ( server, name) = OsIpcOneShotServer :: new ( ) . unwrap ( ) ;
@@ -972,7 +973,7 @@ mod sync_test {
972973// Note! This test is actually used by the
973974// cross_process_two_step_transfer_spawn() test below. Running it by
974975// itself is meaningless, but it passes if run this way.
975- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = " android") ) ) ]
976+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
976977#[ test]
977978#[ ignore]
978979fn cross_process_two_step_transfer_server ( )
@@ -1013,10 +1014,16 @@ fn cross_process_two_step_transfer_server()
10131014 unsafe { libc:: exit ( 0 ) ; }
10141015}
10151016
1016- // TODO -- this fails on OSX with a MACH_SEND_INVALID_RIGHT!
1017- // Needs investigation.
1018- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = "android" ) ) ) ]
1019- #[ cfg_attr( target_os = "macos" , ignore) ]
1017+ // This test panics on Windows, because the other process will panic
1018+ // when it detects that it receives handles that are intended for another
1019+ // process. It's marked as ignore/known-fail on Windows for this reason.
1020+ //
1021+ // TODO -- this fails on OSX as well with a MACH_SEND_INVALID_RIGHT!
1022+ // Needs investigation. It may be a similar underlying issue, just done by
1023+ // the kernel instead of explicitly (ports in a message that's already
1024+ // buffered are intended for only one process).
1025+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
1026+ #[ cfg_attr( any( target_os = "windows" , target_os = "macos" ) , ignore) ]
10201027#[ test]
10211028fn cross_process_two_step_transfer_spawn ( ) {
10221029 let cookie: & [ u8 ] = b"cookie" ;
0 commit comments