From 9a76f3ba31365c77291eae72d84f848dc7d677f9 Mon Sep 17 00:00:00 2001 From: Pyokyeong Son Date: Thu, 31 Mar 2022 15:50:52 +0900 Subject: [PATCH] tests/mkdir: reduced tested permission combinations tests/pwd: escapted directory paths --- tests/by-util/test_mkdir.rs | 7 +++---- tests/by-util/test_pwd.rs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/by-util/test_mkdir.rs b/tests/by-util/test_mkdir.rs index 09e9915db..b2d2dc8fd 100644 --- a/tests/by-util/test_mkdir.rs +++ b/tests/by-util/test_mkdir.rs @@ -19,7 +19,6 @@ static TEST_DIR10: &str = "mkdir_test10/."; static TEST_DIR11: &str = "mkdir_test11/.."; static TEST_DIR12: &str = "mkdir_test12"; - #[test] fn test_mkdir_mkdir() { new_ucmd!().arg(TEST_DIR1).succeeds(); @@ -175,8 +174,8 @@ fn test_umask_compliance() { } // set umask back to original } - for i in 0o0..0o777 { + for i in 0o0..0o027 { // tests all permission combinations - test_single_case(i); + test_single_case(i as mode_t); } -} \ No newline at end of file +} diff --git a/tests/by-util/test_pwd.rs b/tests/by-util/test_pwd.rs index bc08ddbb0..950a148a3 100644 --- a/tests/by-util/test_pwd.rs +++ b/tests/by-util/test_pwd.rs @@ -26,7 +26,7 @@ fn test_deleted_dir() { let output = Command::new("sh") .arg("-c") .arg(format!( - "cd '{}'; mkdir foo; cd foo; rmdir ../foo; exec {} {}", + "cd '{}'; mkdir foo; cd foo; rmdir ../foo; exec '{}' {}", at.root_dir_resolved(), ts.bin_path.to_str().unwrap(), ts.util_name,