|
1 | 1 | use super::*;
|
2 | 2 | use crate::io::prelude::*;
|
3 | 3 | use crate::io::{self, ErrorKind, IoSlice, IoSliceMut};
|
| 4 | +#[cfg(any( |
| 5 | + target_os = "android", |
| 6 | + target_os = "dragonfly", |
| 7 | + target_os = "emscripten", |
| 8 | + target_os = "freebsd", |
| 9 | + target_os = "linux", |
| 10 | + target_os = "netbsd", |
| 11 | + target_os = "openbsd", |
| 12 | +))] |
4 | 13 | use crate::iter::FromIterator;
|
| 14 | +#[cfg(any( |
| 15 | + target_os = "android", |
| 16 | + target_os = "dragonfly", |
| 17 | + target_os = "emscripten", |
| 18 | + target_os = "freebsd", |
| 19 | + target_os = "linux", |
| 20 | + target_os = "netbsd", |
| 21 | + target_os = "openbsd", |
| 22 | +))] |
5 | 23 | use crate::os::unix::io::AsRawFd;
|
6 | 24 | use crate::sys_common::io::test::tmpdir;
|
7 | 25 | use crate::thread;
|
@@ -454,6 +472,15 @@ fn test_unix_datagram_peek_from() {
|
454 | 472 | assert_eq!(msg, &buf[..]);
|
455 | 473 | }
|
456 | 474 |
|
| 475 | +#[cfg(any( |
| 476 | + target_os = "android", |
| 477 | + target_os = "dragonfly", |
| 478 | + target_os = "emscripten", |
| 479 | + target_os = "freebsd", |
| 480 | + target_os = "linux", |
| 481 | + target_os = "netbsd", |
| 482 | + target_os = "openbsd", |
| 483 | +))] |
457 | 484 | #[test]
|
458 | 485 | fn test_send_vectored_fds_unix_stream() {
|
459 | 486 | let (s1, s2) = or_panic!(UnixStream::pair());
|
@@ -491,7 +518,7 @@ fn test_send_vectored_fds_unix_stream() {
|
491 | 518 | }
|
492 | 519 | }
|
493 | 520 |
|
494 |
| -#[cfg(any(test, target_os = "android", target_os = "emscripten", target_os = "linux",))] |
| 521 | +#[cfg(any(target_os = "android", target_os = "emscripten", target_os = "linux",))] |
495 | 522 | #[test]
|
496 | 523 | fn test_send_vectored_with_ancillary_to_unix_datagram() {
|
497 | 524 | fn getpid() -> libc::pid_t {
|
@@ -559,7 +586,6 @@ fn test_send_vectored_with_ancillary_to_unix_datagram() {
|
559 | 586 | }
|
560 | 587 |
|
561 | 588 | #[cfg(any(
|
562 |
| - test, |
563 | 589 | target_os = "android",
|
564 | 590 | target_os = "dragonfly",
|
565 | 591 | target_os = "emscripten",
|
|
0 commit comments