diff options
| author | LinkTed <LinkTed@users.noreply.github.com> | 2020-10-21 17:51:53 +0200 |
|---|---|---|
| committer | LinkTed <LinkTed@users.noreply.github.com> | 2020-10-28 18:22:16 +0100 |
| commit | ea5e012ba73e914629360db7ea114c0a89699612 (patch) | |
| tree | b91f1a7eafde582f8a34d94a9d3f1de229a08c59 /library/std/src/sys/unix/ext/net/tests.rs | |
| parent | 79273fa30c62f2277688ed19649a0b45b902c8a1 (diff) | |
| download | rust-ea5e012ba73e914629360db7ea114c0a89699612.tar.gz rust-ea5e012ba73e914629360db7ea114c0a89699612.zip | |
Fix test cases for MacOs
Diffstat (limited to 'library/std/src/sys/unix/ext/net/tests.rs')
| -rw-r--r-- | library/std/src/sys/unix/ext/net/tests.rs | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/library/std/src/sys/unix/ext/net/tests.rs b/library/std/src/sys/unix/ext/net/tests.rs index bf114bbe6e5..97a016904b4 100644 --- a/library/std/src/sys/unix/ext/net/tests.rs +++ b/library/std/src/sys/unix/ext/net/tests.rs @@ -1,7 +1,25 @@ use super::*; use crate::io::prelude::*; use crate::io::{self, ErrorKind, IoSlice, IoSliceMut}; +#[cfg(any( + target_os = "android", + target_os = "dragonfly", + target_os = "emscripten", + target_os = "freebsd", + target_os = "linux", + target_os = "netbsd", + target_os = "openbsd", +))] use crate::iter::FromIterator; +#[cfg(any( + target_os = "android", + target_os = "dragonfly", + target_os = "emscripten", + target_os = "freebsd", + target_os = "linux", + target_os = "netbsd", + target_os = "openbsd", +))] use crate::os::unix::io::AsRawFd; use crate::sys_common::io::test::tmpdir; use crate::thread; @@ -454,6 +472,15 @@ fn test_unix_datagram_peek_from() { assert_eq!(msg, &buf[..]); } +#[cfg(any( + target_os = "android", + target_os = "dragonfly", + target_os = "emscripten", + target_os = "freebsd", + target_os = "linux", + target_os = "netbsd", + target_os = "openbsd", +))] #[test] fn test_send_vectored_fds_unix_stream() { let (s1, s2) = or_panic!(UnixStream::pair()); @@ -491,7 +518,7 @@ fn test_send_vectored_fds_unix_stream() { } } -#[cfg(any(test, target_os = "android", target_os = "emscripten", target_os = "linux",))] +#[cfg(any(target_os = "android", target_os = "emscripten", target_os = "linux",))] #[test] fn test_send_vectored_with_ancillary_to_unix_datagram() { fn getpid() -> libc::pid_t { @@ -559,7 +586,6 @@ fn test_send_vectored_with_ancillary_to_unix_datagram() { } #[cfg(any( - test, target_os = "android", target_os = "dragonfly", target_os = "emscripten", |
