Skip to content

Commit

Permalink
Add conditional compilation for test_aio_drop
Browse files Browse the repository at this point in the history
As it doesn't build on OpenBSD.
  • Loading branch information
thendiscard committed Dec 21, 2018
1 parent 25fa7db commit 8dd9915
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/sys/test_aio_drop.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
extern crate nix;
extern crate tempfile;

#[cfg(not(target_os = "openbsd"))]
#[cfg(any(target_os = "linux",
target_os = "ios",
target_os = "macos",
target_os = "freebsd",
target_os = "netbsd"))]
use nix::sys::aio::*;
use nix::sys::signal::*;
use std::os::unix::io::AsRawFd;
Expand All @@ -12,8 +16,12 @@ use tempfile::tempfile;
// the AIO subsystem and causes subsequent tests to fail
#[test]
#[should_panic(expected = "Dropped an in-progress AioCb")]
#[cfg(not(any(target_env = "musl",
target_os = "openbsd")))]
#[cfg(all(not(target_env = "musl"),
any(target_os = "linux",
target_os = "ios",
target_os = "macos",
target_os = "freebsd",
target_os = "netbsd")))]
fn test_drop() {
const WBUF: &[u8] = b"CDEF";

Expand Down

0 comments on commit 8dd9915

Please sign in to comment.