@@ -23,6 +23,7 @@ macro_rules! or_panic {
2323}
2424
2525#[ test]
26+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
2627fn basic ( ) {
2728 let dir = tmpdir ( ) ;
2829 let socket_path = dir. path ( ) . join ( "sock" ) ;
@@ -93,6 +94,7 @@ fn pair() {
9394}
9495
9596#[ test]
97+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
9698fn try_clone ( ) {
9799 let dir = tmpdir ( ) ;
98100 let socket_path = dir. path ( ) . join ( "sock" ) ;
@@ -119,6 +121,7 @@ fn try_clone() {
119121}
120122
121123#[ test]
124+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
122125fn iter ( ) {
123126 let dir = tmpdir ( ) ;
124127 let socket_path = dir. path ( ) . join ( "sock" ) ;
@@ -168,6 +171,7 @@ fn long_path() {
168171
169172#[ test]
170173#[ cfg( not( target_os = "nto" ) ) ]
174+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
171175fn timeouts ( ) {
172176 let dir = tmpdir ( ) ;
173177 let socket_path = dir. path ( ) . join ( "sock" ) ;
@@ -195,6 +199,7 @@ fn timeouts() {
195199}
196200
197201#[ test]
202+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
198203fn test_read_timeout ( ) {
199204 let dir = tmpdir ( ) ;
200205 let socket_path = dir. path ( ) . join ( "sock" ) ;
@@ -214,6 +219,7 @@ fn test_read_timeout() {
214219}
215220
216221#[ test]
222+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
217223fn test_read_with_timeout ( ) {
218224 let dir = tmpdir ( ) ;
219225 let socket_path = dir. path ( ) . join ( "sock" ) ;
@@ -241,6 +247,7 @@ fn test_read_with_timeout() {
241247// Ensure the `set_read_timeout` and `set_write_timeout` calls return errors
242248// when passed zero Durations
243249#[ test]
250+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
244251fn test_unix_stream_timeout_zero_duration ( ) {
245252 let dir = tmpdir ( ) ;
246253 let socket_path = dir. path ( ) . join ( "sock" ) ;
@@ -260,6 +267,7 @@ fn test_unix_stream_timeout_zero_duration() {
260267}
261268
262269#[ test]
270+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
263271fn test_unix_datagram ( ) {
264272 let dir = tmpdir ( ) ;
265273 let path1 = dir. path ( ) . join ( "sock1" ) ;
@@ -276,6 +284,7 @@ fn test_unix_datagram() {
276284}
277285
278286#[ test]
287+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
279288fn test_unnamed_unix_datagram ( ) {
280289 let dir = tmpdir ( ) ;
281290 let path1 = dir. path ( ) . join ( "sock1" ) ;
@@ -293,6 +302,7 @@ fn test_unnamed_unix_datagram() {
293302}
294303
295304#[ test]
305+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
296306fn test_unix_datagram_connect_to_recv_addr ( ) {
297307 let dir = tmpdir ( ) ;
298308 let path1 = dir. path ( ) . join ( "sock1" ) ;
@@ -317,6 +327,7 @@ fn test_unix_datagram_connect_to_recv_addr() {
317327}
318328
319329#[ test]
330+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
320331fn test_connect_unix_datagram ( ) {
321332 let dir = tmpdir ( ) ;
322333 let path1 = dir. path ( ) . join ( "sock1" ) ;
@@ -343,6 +354,7 @@ fn test_connect_unix_datagram() {
343354}
344355
345356#[ test]
357+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
346358fn test_unix_datagram_recv ( ) {
347359 let dir = tmpdir ( ) ;
348360 let path1 = dir. path ( ) . join ( "sock1" ) ;
@@ -385,6 +397,7 @@ fn datagram_pair() {
385397// Ensure the `set_read_timeout` and `set_write_timeout` calls return errors
386398// when passed zero Durations
387399#[ test]
400+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
388401fn test_unix_datagram_timeout_zero_duration ( ) {
389402 let dir = tmpdir ( ) ;
390403 let path = dir. path ( ) . join ( "sock" ) ;
@@ -529,6 +542,7 @@ fn test_abstract_no_pathname_and_not_unnamed() {
529542}
530543
531544#[ test]
545+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
532546fn test_unix_stream_peek ( ) {
533547 let ( txdone, rxdone) = crate :: sync:: mpsc:: channel ( ) ;
534548
@@ -561,6 +575,7 @@ fn test_unix_stream_peek() {
561575}
562576
563577#[ test]
578+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
564579fn test_unix_datagram_peek ( ) {
565580 let dir = tmpdir ( ) ;
566581 let path1 = dir. path ( ) . join ( "sock" ) ;
@@ -585,6 +600,7 @@ fn test_unix_datagram_peek() {
585600}
586601
587602#[ test]
603+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
588604fn test_unix_datagram_peek_from ( ) {
589605 let dir = tmpdir ( ) ;
590606 let path1 = dir. path ( ) . join ( "sock" ) ;
@@ -648,6 +664,7 @@ fn test_send_vectored_fds_unix_stream() {
648664
649665#[ cfg( any( target_os = "android" , target_os = "linux" , target_os = "freebsd" ) ) ]
650666#[ test]
667+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
651668fn test_send_vectored_with_ancillary_to_unix_datagram ( ) {
652669 fn getpid ( ) -> libc:: pid_t {
653670 unsafe { libc:: getpid ( ) }
@@ -715,6 +732,7 @@ fn test_send_vectored_with_ancillary_to_unix_datagram() {
715732
716733#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
717734#[ test]
735+ #[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
718736fn test_send_vectored_with_ancillary_unix_datagram ( ) {
719737 let dir = tmpdir ( ) ;
720738 let path1 = dir. path ( ) . join ( "sock1" ) ;
0 commit comments