HLE: add synthetic unit tests for storage.rs and host.rs #1193
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1193
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@geiyiliyabumo on GitHub · 2026-11-24 16:23 UTC · original
geiyiliyabumo:test/hle-storage-and-host→main· +355 −26 · 2 files · 1 commits · openSummary
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.
@Zipettte on GitHub · 2026-11-24 18:00 UTC · original
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).
@Marvisak on GitHub · 2026-11-25 01:26 UTC · original
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
@fuzeofficlal on GitHub · 2026-11-26 01:02 UTC · original
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.