-
Notifications
You must be signed in to change notification settings - Fork 813
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5237 from wasmerio/fix/mkdir-rename-mkdir
Fix handling of the root dir in `path_create_directory` and `get_inode_at_path_inner`
- Loading branch information
Showing
11 changed files
with
108 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
tests/integration/cli/tests/snapshots/snapshot__snapshot_mkdir_rename.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
source: tests/integration/cli/tests/snapshot.rs | ||
assertion_line: 1369 | ||
expression: snapshot | ||
--- | ||
{ | ||
"spec": { | ||
"name": "snapshot::test_snapshot_mkdir_rename", | ||
"use_packages": [], | ||
"include_webcs": [], | ||
"cli_args": [], | ||
"enable_threads": true, | ||
"enable_network": false | ||
}, | ||
"result": { | ||
"Success": { | ||
"stdout": "", | ||
"stderr": "", | ||
"exit_code": 0 | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
fn main() { | ||
std::fs::create_dir("/a").unwrap(); | ||
assert!(std::fs::metadata("/a").unwrap().is_dir()); | ||
|
||
std::fs::rename("/a", "/b").unwrap(); | ||
assert!(matches!(std::fs::metadata("/a"), Err(e) if e.kind() == std::io::ErrorKind::NotFound)); | ||
assert!(std::fs::metadata("/b").unwrap().is_dir()); | ||
|
||
std::fs::create_dir("/a").unwrap(); | ||
assert!(std::fs::metadata("/a").unwrap().is_dir()); | ||
assert!(std::fs::metadata("/b").unwrap().is_dir()); | ||
} |