HLE: add synthetic unit tests for storage.rs and host.rs #1193
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1193"
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 Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T16:23:23Z.
Summary
Closes #942
Full verification details and change notes are documented in #942 (commit
62abb60, based onmainffe310e).Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --checkon edited files: PASScargo xtask policy: PASS (zero game files/data)cargo clippy --all-targets --locked -- -D warnings(default +--features diagnosticswhere applicable): PASSAI-assisted; synthetic tests only, no game files.
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:00:24Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
62abb60:cargo test -p victory-hlepasses, 105 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:26:26Z.
Automated triage for the maintainers.
Merge candidate. This is tests only, plus
DefaultonSpaceInfo:crates/victory-hle/src/modules/storage.rs, it adds tests for the drive-root path and its NUL,E_FAILon a short buffer with nothing written,NOT_SUPPORTEDbefore a title is set, and recursiveused_bytes. It also covers quota and free-space reporting (including over-quota and a missing folder) and the space prompt's bounds. A module-local lock serialises the tests that set the process-wide title;storage.rsis the only test module that callsruntime::set_title.crates/victory-hle/src/host.rs, it adds tests forHostPolicymatching (case,*prefix, look-alike names) and resolution throughGetProcAddress.I checked each assertion against
main'spath,path_size,spaceandprompt_for_space, and they match the documented behaviour in those functions. One note for the maintainer:the_default_policy_is_an_allow_listlists the default allow list name by name, includingws2_32.dll,winhttp.dllandiphlpapi.dll. Any future change to that list will need this test updated too, which is arguably the point.CI: no check runs on the head commit. A reviewer reports
cargo test -p victory-hlepassing (105 tests).Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T01:02:53Z.
Code review and Windows 11 verification at head
62abb6071a7dmerged cleanly ontomain(63bcca43c6a0):crates/victory-hle/src/host.rs:150-289,storage.rs:164-431):tempfile::tempdir()instances (no external paths or game files). Verifiedstorage::testsis the sole caller ofruntime::set_titleacross the repo and every such test acquiresTITLE_TESTS, so parallel execution is race-free.cargo xtask policy:191 files ok;cargo clippy -p victory-hle --all-targets --locked -- -D warnings(default +--all-features): 0 warningscargo test -p victory-hle --locked(default +--all-features): 162/162 lib + 1 subprocess +fidelityfx+no_dll_plantingpassed; parallel--test-threads=8re-run ofmodules::storage::tests(8/8) andhost::tests(3/3) passed cleanly.LGTM.
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.