Fix test cases for MacOs
This commit is contained in:
parent
79273fa30c
commit
ea5e012ba7
1 changed files with 28 additions and 2 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue