summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/sys/mod.rs2
-rw-r--r--test/sys/test_uio.rs4
-rw-r--r--test/test_signalfd.rs9
3 files changed, 7 insertions, 8 deletions
diff --git a/test/sys/mod.rs b/test/sys/mod.rs
index fbb4a6e0..fd4e984d 100644
--- a/test/sys/mod.rs
+++ b/test/sys/mod.rs
@@ -1,6 +1,6 @@
mod test_socket;
mod test_termios;
-mod test_uio;
mod test_ioctl;
mod test_wait;
mod test_select;
+mod test_uio;
diff --git a/test/sys/test_uio.rs b/test/sys/test_uio.rs
index 4261b5de..fdf49bf5 100644
--- a/test/sys/test_uio.rs
+++ b/test/sys/test_uio.rs
@@ -130,7 +130,7 @@ fn test_pread() {
}
#[test]
-#[cfg(target_os = "linux")]
+#[cfg(feature = "preadv_pwritev")]
fn test_pwritev() {
use std::io::Read;
@@ -160,7 +160,7 @@ fn test_pwritev() {
}
#[test]
-#[cfg(target_os = "linux")]
+#[cfg(feature = "preadv_pwritev")]
fn test_preadv() {
use std::io::Write;
diff --git a/test/test_signalfd.rs b/test/test_signalfd.rs
index 2ca5b61c..fb28e2ad 100644
--- a/test/test_signalfd.rs
+++ b/test/test_signalfd.rs
@@ -1,13 +1,12 @@
-#![cfg(feature = "signalfd")]
-
extern crate nix;
use nix::unistd;
-#[cfg(any(target_os = "linux", target_os = "android"))]
+#[cfg(feature = "signalfd")]
+
use nix::sys::signalfd::*;
-#[cfg(any(target_os = "linux", target_os = "android"))]
+#[cfg(feature = "signalfd")]
fn main() {
let mut mask = SigSet::empty();
mask.add(signal::SIGUSR1).unwrap();
@@ -28,5 +27,5 @@ fn main() {
assert_eq!(info.ssi_signo as i32, signal::SIGUSR1);
}
-#[cfg(not(any(target_os = "linux", target_os = "android")))]
+#[cfg(not(feature = "signalfd"))]
fn main() {}