summaryrefslogtreecommitdiff
path: root/test/test_stat.rs
diff options
context:
space:
mode:
authorXavier L'Heureux <xavier.lheureux@icloud.com>2019-07-16 15:02:54 -0400
committerXavier L'Heureux <dev.xlheureux@gmail.com>2020-05-17 21:05:45 -0400
commite94c139a47055d3492d6ccccfce4acbcba9d7391 (patch)
tree7419cc1c1461cda63e4e2a735fd75e4a48677f81 /test/test_stat.rs
parent0259f9d51718b90118bbd1d792c88781d0aa98f7 (diff)
downloadnix-e94c139a47055d3492d6ccccfce4acbcba9d7391.zip
Remove more unsupported functions and make it possible to run tests
Diffstat (limited to 'test/test_stat.rs')
-rw-r--r--test/test_stat.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/test_stat.rs b/test/test_stat.rs
index d1809387..4a4a2c6a 100644
--- a/test/test_stat.rs
+++ b/test/test_stat.rs
@@ -9,7 +9,9 @@ use libc::{S_IFMT, S_IFLNK, mode_t};
use nix::{fcntl, Error};
use nix::errno::{Errno};
-use nix::sys::stat::{self, fchmod, fchmodat, futimens, stat, utimes, utimensat, mkdirat};
+use nix::sys::stat::{self, fchmod, futimens, stat, utimes};
+#[cfg(not(target_os = "redox"))]
+use nix::sys::stat::{fchmodat, utimensat, mkdirat};
#[cfg(any(target_os = "linux",
target_os = "haiku",
target_os = "ios",
@@ -92,7 +94,7 @@ fn test_stat_and_fstat() {
}
#[test]
-#[cfg(not(any(target_os = "netbsd")))]
+#[cfg(not(any(target_os = "netbsd", target_os = "redox")))]
fn test_fstatat() {
let tempdir = tempfile::tempdir().unwrap();
let filename = tempdir.path().join("foo.txt");
@@ -155,6 +157,7 @@ fn test_fchmod() {
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_fchmodat() {
let _dr = ::DirRestore::new();
let tempdir = tempfile::tempdir().unwrap();
@@ -243,6 +246,7 @@ fn test_futimens() {
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_utimensat() {
let _dr = ::DirRestore::new();
let tempdir = tempfile::tempdir().unwrap();
@@ -264,6 +268,7 @@ fn test_utimensat() {
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_mkdirat_success_path() {
let tempdir = tempfile::tempdir().unwrap();
let filename = "example_subdir";
@@ -273,6 +278,7 @@ fn test_mkdirat_success_path() {
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_mkdirat_success_mode() {
let expected_bits = stat::SFlag::S_IFDIR.bits() | stat::Mode::S_IRWXU.bits();
let tempdir = tempfile::tempdir().unwrap();
@@ -285,6 +291,7 @@ fn test_mkdirat_success_mode() {
}
#[test]
+#[cfg(not(target_os = "redox"))]
fn test_mkdirat_fail() {
let tempdir = tempfile::tempdir().unwrap();
let not_dir_filename= "example_not_dir";