[Bug 51443] New: Test fails in remove_dir_all crate when creating file
WineHQ Bugzilla
wine-bugs at winehq.org
Sat Jul 10 07:03:23 CDT 2021
https://bugs.winehq.org/show_bug.cgi?id=51443
Bug ID: 51443
Summary: Test fails in remove_dir_all crate when creating file
Product: Wine
Version: 6.12
Hardware: x86-64
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: -unknown
Assignee: wine-bugs at winehq.org
Reporter: mikrutrafal at protonmail.com
Distribution: ---
Hi,
Steps to reproduce on clear wine-devel 6.12
```
wget https://static.rust-lang.org/dist/rust-1.53.0-x86_64-pc-windows-gnu.msi
msiexec /i rust-1.53.0-x86_64-pc-windows-gnu.msi
git clone https://github.com/XAMPPRocky/remove_dir_all.git
cd remove_dir_all
git checkout 9b164cecdb4a0590af68be8b22f9c747402237e3
wine cargo test
```
should print this
```
running 4 tests
test removes_read_only ... FAILED
test removes_empty ... ok
test removes_files ... ok
test removes_dirs ... ok
failures:
---- removes_read_only stdout ----
thread 'removes_read_only' panicked at 'called `Result::unwrap()` on an `Err`
value: Os { code: 5, kind: PermissionDenied, message: "Access denied." }',
tests\windows.rs:68:49
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
removes_read_only
test result: FAILED. 3 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out;
finished in 0.01s
error: test failed, to rerun pass '--test windows'
```
I tested it and this works fine in Windows Server 2019
Source code of failed test -
https://github.com/XAMPPRocky/remove_dir_all/blob/9b164cecdb4a0590af68be8b22f9c747402237e3/tests/windows.rs#L58-L68
```
fn removes_read_only() {
env_logger::init();
for i in 0..5 {
let path = format!("./readonly/{}/subdir", i);
fs::create_dir_all(&path).unwrap();
let file_path = format!("{}/file.txt", path);
{
let file = File::create(&file_path).unwrap();
```
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list