HLE: add synthetic unit tests for storage.rs and host.rs #942

Open
opened 2026-11-26 04:14:36 +00:00 by github-bot · 3 comments
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 14:24 UTC · original

Summary

Adds 10 deterministic synthetic unit tests for crates/victory-hle/src/modules/storage.rs (1 -> 7 tests, plus Default derive on SpaceInfo) and crates/victory-hle/src/host.rs (0 -> 3 tests).

Because external PR creation is currently restricted (collaborators_only), the CI-green branch is ready on my fork for cherry-pick / review:

  • Branch: geiyiliyabumo/VIctory@test/hle-storage-and-host
  • Commit: geiyiliyabumo/VIctory@62abb60 (based on main ffe310e)

Tests Added (Synthetic Only)

  • crates/victory-hle/src/modules/storage.rs (7 tests total): drive-root serving, IID/IID_2026 query, path calls before/after storage setup, drive root + NUL buffer handling, recursive used_bytes, quota/free space reporting, and async space-prompt bounds.
  • crates/victory-hle/src/host.rs (3 tests total): case-insensitive DLL name/prefix matching, default allow-list policy, and allowed DLL host function resolution.

Verification (Windows 11 x64 MSVC)

  • rustfmt --edition 2024 --check: PASS
  • cargo xtask policy: PASS (154 files ok)
  • cargo clippy -p victory-hle --all-targets --locked -- -D warnings (default + --features diagnostics): PASS (0 warnings)
  • cargo test -p victory-hle --locked -- storage:: (7/7 modules::storage::tests PASS) & -- host:: (3/3 host::tests PASS)

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 14:24 UTC · [original](https://github.com/Marvisak/VIctory/issues/942) ### Summary Adds 10 deterministic synthetic unit tests for `crates/victory-hle/src/modules/storage.rs` (1 -> 7 tests, plus `Default` derive on `SpaceInfo`) and `crates/victory-hle/src/host.rs` (0 -> 3 tests). Because external PR creation is currently restricted (`collaborators_only`), the CI-green branch is ready on my fork for cherry-pick / review: - **Branch**: `geiyiliyabumo/VIctory@test/hle-storage-and-host` - **Commit**: `geiyiliyabumo/VIctory@62abb60` (based on `main` `ffe310e`) ### Tests Added (Synthetic Only) - `crates/victory-hle/src/modules/storage.rs` (7 tests total): drive-root serving, `IID`/`IID_2026` query, path calls before/after storage setup, drive root + NUL buffer handling, recursive `used_bytes`, quota/free space reporting, and async space-prompt bounds. - `crates/victory-hle/src/host.rs` (3 tests total): case-insensitive DLL name/prefix matching, default allow-list policy, and allowed DLL host function resolution. ### Verification (Windows 11 x64 MSVC) - `rustfmt --edition 2024 --check`: **PASS** - `cargo xtask policy`: **PASS** (`154 files ok`) - `cargo clippy -p victory-hle --all-targets --locked -- -D warnings` (default + `--features diagnostics`): **PASS** (0 warnings) - `cargo test -p victory-hle --locked -- storage::` (**7/7** `modules::storage::tests` PASS) & `-- host::` (**3/3** `host::tests` PASS) *AI-assisted; synthetic tests only, no game files.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:14:36 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 06:51 UTC · original · edited 2026-11-25 09:56 UTC

Automated triage for the maintainers.

This requests test coverage and comes with a branch. On current main, crates/victory-hle/src/modules/storage.rs and crates/victory-hle/src/host.rs still have one unit test each, so these tests would add coverage.

Correction to the earlier version of this comment: open PR #1193 carries this branch. The comments above report that it passes as-is (105 victory-hle tests) but sits on the old ffe310e base and is far behind main. It needs a rebase before review. The maintainers decide from there.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 06:51 UTC · [original](https://github.com/Marvisak/VIctory/issues/942#issuecomment-7155234316) · edited 2026-11-25 09:56 UTC <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-25T09:10:09Z at=2026-11-25T09:50:38Z --> Automated triage for the maintainers. This requests test coverage and comes with a branch. On current `main`, `crates/victory-hle/src/modules/storage.rs` and `crates/victory-hle/src/host.rs` still have one unit test each, so these tests would add coverage. Correction to the earlier version of this comment: open PR #1193 carries this branch. The comments above report that it passes as-is (105 `victory-hle` tests) but sits on the old `ffe310e` base and is far behind `main`. It needs a rebase before review. The maintainers decide from there. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠StExpeditus on GitHub · 2026-11-25 09:09 UTC · original

Validated the fork branch on Windows 11 Pro 26200 (Intel Core i5-14600K, Rust 1.98.1 MSVC), commit 62abb60: cargo test -p victory-hle --locked --no-fail-fast -> 105 passed, 0 failed, 0 ignored. Synthetic tests only, no game files.

**@⁠StExpeditus** on GitHub · 2026-11-25 09:09 UTC · [original](https://github.com/Marvisak/VIctory/issues/942#issuecomment-7157958750) Validated the fork branch on Windows 11 Pro 26200 (Intel Core i5-14600K, Rust 1.98.1 MSVC), commit `62abb60`: `cargo test -p victory-hle --locked --no-fail-fast` -> **105 passed, 0 failed, 0 ignored**. Synthetic tests only, no game files.
Author
Owner

@⁠StExpeditus on GitHub · 2026-11-25 09:10 UTC · original

Addendum: this branch's base is well behind current main - the victory-hle delta against main is 28 files, 563 insertions, 4,300 deletions (e.g. tests/fidelityfx.rs moved since). The 105 passed above are the branch as-is on its old base; it needs a rebase before a clean cherry-pick. The other three validated issues from this author (#1029, #1028, #945) apply with only small delta.

**@⁠StExpeditus** on GitHub · 2026-11-25 09:10 UTC · [original](https://github.com/Marvisak/VIctory/issues/942#issuecomment-7157966585) Addendum: this branch's base is well behind current main - the `victory-hle` delta against main is 28 files, 563 insertions, 4,300 deletions (e.g. `tests/fidelityfx.rs` moved since). The 105 passed above are the branch as-is on its old base; it needs a rebase before a clean cherry-pick. The other three validated issues from this author (#1029, #1028, #945) apply with only small delta.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#942
No description provided.