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 ( ) ;
@@ -727,7 +728,7 @@ fn cross_process_fork() {
727728// Note! This test is actually used by the cross_process_sender_transfer_spawn() test
728729// below as a second process. Running it by itself is meaningless, but
729730// passes.
730- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = " android") ) ) ]
731+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
731732#[ test]
732733#[ ignore]
733734fn cross_process_sender_transfer_server ( )
@@ -747,7 +748,7 @@ fn cross_process_sender_transfer_server()
747748 unsafe { libc:: exit ( 0 ) ; }
748749}
749750
750- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = " android") ) ) ]
751+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
751752#[ test]
752753fn cross_process_sender_transfer_spawn ( ) {
753754 let ( server, name) = OsIpcOneShotServer :: new ( ) . unwrap ( ) ;
@@ -974,7 +975,7 @@ mod sync_test {
974975// Note! This test is actually used by the
975976// cross_process_two_step_transfer_spawn() test below. Running it by
976977// itself is meaningless, but it passes if run this way.
977- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = " android") ) ) ]
978+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
978979#[ test]
979980#[ ignore]
980981fn cross_process_two_step_transfer_server ( )
@@ -1016,10 +1017,16 @@ fn cross_process_two_step_transfer_server()
10161017 unsafe { libc:: exit ( 0 ) ; }
10171018}
10181019
1019- // TODO -- this fails on OSX with a MACH_SEND_INVALID_RIGHT!
1020- // Needs investigation.
1021- #[ cfg( not( any( feature = "force-inprocess" , target_os = "windows" , target_os = "android" ) ) ) ]
1022- #[ cfg_attr( target_os = "macos" , ignore) ]
1020+ // This test panics on Windows, because the other process will panic
1021+ // when it detects that it receives handles that are intended for another
1022+ // process. It's marked as ignore/known-fail on Windows for this reason.
1023+ //
1024+ // TODO -- this fails on OSX as well with a MACH_SEND_INVALID_RIGHT!
1025+ // Needs investigation. It may be a similar underlying issue, just done by
1026+ // the kernel instead of explicitly (ports in a message that's already
1027+ // buffered are intended for only one process).
1028+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" ) ) ) ]
1029+ #[ cfg_attr( any( target_os = "windows" , target_os = "macos" ) , ignore) ]
10231030#[ test]
10241031fn cross_process_two_step_transfer_spawn ( ) {
10251032 let cookie: & [ u8 ] = b"cookie" ;
0 commit comments