Skip to content

Commit c5dca77

Browse files
committed
test: null-terminated path for reserved windows name detection
The test is still nightly only to avoid blocking rust-lang/rust. Once we figure it is not flaky anymore we should re-enable it. https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/reserved_windows_name.20test.20failing/
1 parent 8a8ef3e commit c5dca77

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

crates/cargo-test-support/src/paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ pub fn windows_reserved_names_are_allowed() -> bool {
451451
use std::ptr;
452452
use windows_sys::Win32::Storage::FileSystem::GetFullPathNameW;
453453

454-
let test_file_name: Vec<_> = OsStr::new("aux.rs").encode_wide().collect();
454+
let test_file_name: Vec<_> = OsStr::new("aux.rs").encode_wide().chain([0]).collect();
455455

456456
let buffer_length =
457457
unsafe { GetFullPathNameW(test_file_name.as_ptr(), 0, ptr::null_mut(), ptr::null_mut()) };

tests/testsuite/package.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2935,7 +2935,8 @@ src/lib.rs
29352935
}
29362936

29372937
#[cargo_test(
2938-
ignore_windows = "temporarily disabling due to flakiness: https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/reserved_windows_name.20test.20failing/with/543085230"
2938+
nightly,
2939+
reason = "temporarily due to flakiness: https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/reserved_windows_name.20test.20failing/with/543085230"
29392940
)]
29402941
#[cfg(windows)]
29412942
fn reserved_windows_name() {

0 commit comments

Comments
 (0)