files test: delete the file again for up to a second (ERROR_SHARING_VIOLATION after fclose, 1 run in 100 to 300) #951
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/952"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T13:39:05Z.
modules::files::tests::long_title_paths_work_on_the_hostfails now and then in the wholevictory-hletest binary. I measured it onZSlayerHQ/victory-world-runtimenext(02ea29c), where this test is identical, on my machine (Windows 11 build 26300, RX 6950 XT, Rust 1.98.1): 1 failing run in 100, then 1 in 300 (never in 400 runs of the test alone).Which line. I printed the Windows error in the failing runs: it is
files.rs:883,assert_ne!(DeleteFileW(...f.txt), 0), and the error isERROR_SHARING_VIOLATION(32, "the file is used by another process"). The delete comes right afterfcloseof the same file. I did not find who holds the file (another test of the binary, or a scan of the new file by the system); I only know it is held for a moment and that it needs the whole binary running.The change. The test tries the delete again every 10 ms for up to a second and then asserts, with the Windows error in the message. Only the test changes.
Checks. 600 runs of the whole
victory_hletest binary with the change: 0 failing runs (before: 1 in 100 and 1 in 300). I did not run the other crates' tests again; nothing outside this test changes. This is a test-robustness change, so there is no test that fails before it: the failure is intermittent. I did not repeat the 100/300/600-run loops on this tree (main0b0074e); the same change is open as ZSlayerHQ/victory-world-runtime#12.harness machine: rx6950xt-w11 | AMD Radeon RX 6950 XT (RDNA2), driver 32.0.21045.29003 | 32 GB RAM | Windows 11 build 26300
AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code
Imported from fxceless/victory-fork. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T13:39:19Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from fxceless/victory-fork. Originally posted by welisonzika14-jpg on 2026-11-25T16:22:13Z.
fxceless/victory-fork PR #952, data from another machine (desktop RTX 5070, Windows 11, Rust 1.98.1, debug profile).
Whole
victory_hleunit-test binary (98 tests, includesmodules::files::tests::long_title_paths_work_on_the_host), run 300 times in a row, serial:3973179: 0 failures in 300.4e68254: 0 failures in 300.So I could not reproduce the
ERROR_SHARING_VIOLATIONhere, with or without the patch. That fits a cause that depends on the machine (antivirus or indexer holding the file), not on the test. The patch causes no failure on this machine.Written with AI help (Claude/Kiro); the numbers are from runs on my machine.
Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T23:36:50Z.
Thank you for the 300 + 300 runs on the RTX 5070. That fits what I saw: here it failed 1 run in 100 and 1 in 300 of the whole binary, and never alone, so it looks tied to the machine (something holding the new file right after
fclose), as you say. Good to know the retry costs nothing where it does not happen.AI-assisted (Claude Code); no game data.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.