From 65469fe85bd1ca30ee5f890e49799d6a67688006 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 12 Mar 2022 13:37:46 -0500 Subject: [PATCH 1/2] test remove_dir_all --- src/shims/posix/macos/dlsym.rs | 1 - tests/run-pass/fs.rs | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/shims/posix/macos/dlsym.rs b/src/shims/posix/macos/dlsym.rs index 9994bfd53d..d5996cc6a9 100644 --- a/src/shims/posix/macos/dlsym.rs +++ b/src/shims/posix/macos/dlsym.rs @@ -17,7 +17,6 @@ impl Dlsym { pub fn from_str(name: &str) -> InterpResult<'static, Option> { Ok(match name { "getentropy" => Some(Dlsym::getentropy), - "openat" => None, // std has a fallback for this _ => throw_unsup_format!("unsupported macOS dlsym: {}", name), }) } diff --git a/tests/run-pass/fs.rs b/tests/run-pass/fs.rs index 7f5553e2f2..67817e3e2c 100644 --- a/tests/run-pass/fs.rs +++ b/tests/run-pass/fs.rs @@ -395,6 +395,12 @@ fn test_directory() { remove_dir(&dir_path).unwrap(); // Reading the metadata of a non-existent directory should fail with a "not found" error. assert_eq!(ErrorKind::NotFound, check_metadata(&[], &dir_path).unwrap_err().kind()); + + // To test remove_dir_all, re-create the directory with a file and a directory in it. + create_dir(&dir_path).unwrap(); + drop(File::create(&path_1).unwrap()); + create_dir(&path_2).unwrap(); + remove_dir_all(&dir_path).unwrap(); } fn test_dup_stdout_stderr() { From 1cda05e174b9860f6c683a55167ab577988c999e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 20 Mar 2022 10:36:44 -0400 Subject: [PATCH 2/2] rustup --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index 5306a4d186..249d5ad47e 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -e95b10ba4ac4564ed25f7eef143e3182c33b3902 +c7ce69faf2a7ea16c15d922985ca27ba70da30ee