Skip to content

Commit a64e6fd

Browse files
committed
Auto merge of #2022 - RalfJung:remove_dir_all, r=RalfJung
test remove_dir_all Blocked on rust-lang/rust#94749 Cc #1966
2 parents 5778667 + 1cda05e commit a64e6fd

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e95b10ba4ac4564ed25f7eef143e3182c33b3902
1+
c7ce69faf2a7ea16c15d922985ca27ba70da30ee

src/shims/posix/macos/dlsym.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ impl Dlsym {
1717
pub fn from_str(name: &str) -> InterpResult<'static, Option<Dlsym>> {
1818
Ok(match name {
1919
"getentropy" => Some(Dlsym::getentropy),
20-
"openat" => None, // std has a fallback for this
2120
_ => throw_unsup_format!("unsupported macOS dlsym: {}", name),
2221
})
2322
}

tests/run-pass/fs.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ fn test_directory() {
395395
remove_dir(&dir_path).unwrap();
396396
// Reading the metadata of a non-existent directory should fail with a "not found" error.
397397
assert_eq!(ErrorKind::NotFound, check_metadata(&[], &dir_path).unwrap_err().kind());
398+
399+
// To test remove_dir_all, re-create the directory with a file and a directory in it.
400+
create_dir(&dir_path).unwrap();
401+
drop(File::create(&path_1).unwrap());
402+
create_dir(&path_2).unwrap();
403+
remove_dir_all(&dir_path).unwrap();
398404
}
399405

400406
fn test_dup_stdout_stderr() {

0 commit comments

Comments
 (0)