summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/sys/test_ptrace.rs1
-rw-r--r--test/test_mount.rs1
-rw-r--r--test/test_stat.rs2
3 files changed, 3 insertions, 1 deletions
diff --git a/test/sys/test_ptrace.rs b/test/sys/test_ptrace.rs
index debc4517..a15a7921 100644
--- a/test/sys/test_ptrace.rs
+++ b/test/sys/test_ptrace.rs
@@ -3,6 +3,7 @@ use nix::errno::Errno;
use nix::unistd::getpid;
use nix::sys::ptrace::{self, Options};
+#[cfg(any(target_os = "android", target_os = "linux"))]
use std::mem;
#[test]
diff --git a/test/test_mount.rs b/test/test_mount.rs
index 2e4f19cc..d2e08bc4 100644
--- a/test/test_mount.rs
+++ b/test/test_mount.rs
@@ -206,6 +206,7 @@ exit 23";
// Test runner
/// Mimic normal test output (hackishly).
+#[cfg(target_os = "linux")]
macro_rules! run_tests {
( $($test_fn:ident),* ) => {{
println!();
diff --git a/test/test_stat.rs b/test/test_stat.rs
index e72dffd3..01d86a79 100644
--- a/test/test_stat.rs
+++ b/test/test_stat.rs
@@ -174,7 +174,7 @@ fn test_utimes() {
let fullpath = tempdir.path().join("file");
drop(File::create(&fullpath).unwrap());
- utimes(&fullpath, &TimeVal::seconds(9990), &TimeVal::seconds(5550));
+ utimes(&fullpath, &TimeVal::seconds(9990), &TimeVal::seconds(5550)).unwrap();
assert_times_eq(9990, 5550, &fs::metadata(&fullpath).unwrap());
}