#5335·miri

windows-fs test fails when run natively

Author: RalfJungCreated Sep 20, 2026Updated Sep 20, 2026
LabelsC-bugA-testsA-windows
  error: test got exit code: 101, but expected 0
    --> tests/pass-dep/shims/windows-fs.rs:91:5
     |
  91 |     assert!(info.dwFileAttributes & FILE_ATTRIBUTE_NORMAL != 0);
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assertion failed: info.dwFileAttributes & FILE_ATTRIBUTE_NORMAL != 0
     |
  
  full stderr:
  
  thread 'main' (6524) panicked at tests/pass-dep\shims\windows-fs.rs:91:5:
  assertion failed: info.dwFileAttributes & FILE_ATTRIBUTE_NORMAL != 0

I don't have a Windows system so I cannot easily debug this. No idea why creating a normal file does not lead to a file that has the FILE_ATTRIBUTE_NORMAL flag...

The test file is here. To reproduce locally on a Windows system:

./miri run --native tests/pass-dep/shims/windows-fs.rs

Cc @CraftSpider @ChrisDenton