-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix renaming a directory that was created with mkdir * Fix inodes' name becoming stale after a rename * Add test for mkdir -> rename -> mkdir * Fix opening files in the presence of a non-default CWD * Fix deadlock when base FD is not / or .
- Loading branch information
Showing
13 changed files
with
133 additions
and
32 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
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()); | ||
} |