fix macro by denying trailing slashes. also other stuff

This commit is contained in:
Pat Hickey
2021-01-28 12:23:48 -08:00
parent 20e9169cc7
commit 1196e216e9
22 changed files with 77 additions and 72 deletions

View File

@@ -2,6 +2,7 @@ pub struct TestConfig {
errno_mode: ErrnoMode,
no_dangling_symlinks: bool,
no_fd_allocate: bool,
no_rename_dir_to_empty_dir: bool,
}
enum ErrnoMode {
@@ -21,10 +22,12 @@ impl TestConfig {
};
let no_dangling_symlinks = std::env::var("NO_DANGLING_SYMLINKS").is_ok();
let no_fd_allocate = std::env::var("NO_FD_ALLOCATE").is_ok();
let no_rename_dir_to_empty_dir = std::env::var("NO_RENAME_DIR_TO_EMPTY_DIR").is_ok();
TestConfig {
errno_mode,
no_dangling_symlinks,
no_fd_allocate,
no_rename_dir_to_empty_dir,
}
}
pub fn errno_expect_unix(&self) -> bool {
@@ -45,4 +48,7 @@ impl TestConfig {
pub fn support_fd_allocate(&self) -> bool {
!self.no_fd_allocate
}
pub fn support_rename_dir_to_empty_dir(&self) -> bool {
!self.no_rename_dir_to_empty_dir
}
}