Skip to content

Commit b21598b

Browse files
committed
Move test_aio_drop from Cargo.toml to test mod.rs
This makes it easier to add conditional compilation flags, the same way it's done for test_aio.
1 parent 25fa7db commit b21598b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ sysctl = "0.1"
3737
name = "test"
3838
path = "test/test.rs"
3939

40-
[[test]]
41-
name = "test-aio-drop"
42-
path = "test/sys/test_aio_drop.rs"
43-
4440
[[test]]
4541
name = "test-lio-listio-resubmit"
4642
path = "test/sys/test_lio_listio_resubmit.rs"

test/sys/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ mod test_signal;
1111
target_os = "macos",
1212
target_os = "netbsd"))]
1313
mod test_aio;
14+
#[cfg(any(target_os = "freebsd",
15+
target_os = "ios",
16+
target_os = "linux",
17+
target_os = "macos",
18+
target_os = "netbsd"))]
19+
mod test_aio_drop;
1420
#[cfg(target_os = "linux")]
1521
mod test_signalfd;
1622
mod test_socket;

test/sys/test_aio_drop.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
extern crate nix;
22
extern crate tempfile;
33

4-
#[cfg(not(target_os = "openbsd"))]
54
use nix::sys::aio::*;
65
use nix::sys::signal::*;
76
use std::os::unix::io::AsRawFd;
@@ -12,8 +11,7 @@ use tempfile::tempfile;
1211
// the AIO subsystem and causes subsequent tests to fail
1312
#[test]
1413
#[should_panic(expected = "Dropped an in-progress AioCb")]
15-
#[cfg(not(any(target_env = "musl",
16-
target_os = "openbsd")))]
14+
#[cfg(not(target_env = "musl"))]
1715
fn test_drop() {
1816
const WBUF: &[u8] = b"CDEF";
1917

0 commit comments

Comments
 (0)