Skip to content

Commit 751f50a

Browse files
PaulDancegitbot
authored and
gitbot
committed
Fix(lib/fs/tests): Disable rename POSIX semantics FS tests under Windows 7
Would otherwise fail there. The Windows7-specific parts were left pretty much untouched by the changes introduced by 00c7055419c12fc71627c05eba356db81ccf5105, so it is expected that these tests fail under Windows 7 as they were probably written to run under Windows 10+ only. Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
1 parent c06a4e9 commit 751f50a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

std/src/fs/tests.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1914,8 +1914,11 @@ fn test_hidden_file_truncation() {
19141914
assert_eq!(metadata.len(), 0);
19151915
}
19161916

1917+
// See https://github.com/rust-lang/rust/pull/131072 for more details about why
1918+
// these two tests are disabled under Windows 7 here.
19171919
#[cfg(windows)]
19181920
#[test]
1921+
#[cfg_attr(target_vendor = "win7", ignore = "Unsupported under Windows 7.")]
19191922
fn test_rename_file_over_open_file() {
19201923
// Make sure that std::fs::rename works if the target file is already opened with FILE_SHARE_DELETE. See #123985.
19211924
let tmpdir = tmpdir();
@@ -1940,6 +1943,7 @@ fn test_rename_file_over_open_file() {
19401943

19411944
#[test]
19421945
#[cfg(windows)]
1946+
#[cfg_attr(target_vendor = "win7", ignore = "Unsupported under Windows 7.")]
19431947
fn test_rename_directory_to_non_empty_directory() {
19441948
// Renaming a directory over a non-empty existing directory should fail on Windows.
19451949
let tmpdir: TempDir = tmpdir();

0 commit comments

Comments
 (0)