take the windows folder of test fixtures from the environment #1950

Manually merged
github merged 1 commit from gh-pr/1950/head into gh-pr/1950/base 2026-11-26 04:49:50 +00:00
Owner

@⁠imjustprism on GitHub · 2026-11-25 01:38 UTC · original
imjustprism:tests/system-folder-fixture → main · +15 −13 · 3 files · 1 commits · merged 2026-11-25 21:52 UTC

three tests copy version.dll out of a hard-coded C:\Windows\System32 to stand in for a dll a title ships. where windows is not installed in C:\Windows that copy fails before anything is tested. the failure quoted in #1881 for ignores_dlls_in_current_folder is that copy, with os error 3 (path not found). the folder now comes from SystemRoot.

a fourth test loads urlmon by the same hard-coded folder to check that the host policy refuses it. with windows elsewhere the host would return null for that path whatever the policy says, so it takes the folder from SystemRoot too.

only tests change. they pass here, and with SystemRoot pointed at a folder that does not exist the copy fails with the same os error 3.

refs #1881

**@⁠imjustprism** on GitHub · 2026-11-25 01:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/1950) `imjustprism:tests/system-folder-fixture` → `main` · +15 −13 · 3 files · 1 commits · merged 2026-11-25 21:52 UTC three tests copy version.dll out of a hard-coded `C:\Windows\System32` to stand in for a dll a title ships. where windows is not installed in `C:\Windows` that copy fails before anything is tested. the failure quoted in #1881 for `ignores_dlls_in_current_folder` is that copy, with os error 3 (path not found). the folder now comes from `SystemRoot`. a fourth test loads urlmon by the same hard-coded folder to check that the host policy refuses it. with windows elsewhere the host would return null for that path whatever the policy says, so it takes the folder from `SystemRoot` too. only tests change. they pass here, and with `SystemRoot` pointed at a folder that does not exist the copy fails with the same os error 3. refs #1881
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:49:47 +00:00
github manually merged commit dee931a554 into gh-pr/1950/base 2026-11-26 04:49:50 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 08:20 UTC · original

Automated triage for the maintainers.

Merge candidate.

Changes tests only. Three fixtures copied version.dll from a hard-coded C:\Windows\System32, and these now build the path from SystemRoot: ignores_dlls_in_current_folder in crates/victory-hle/tests/no_dll_planting.rs, and two tests in crates/victory-loader/tests/load_probe.rs through a new host_dll(). The urlmon policy check in kernel.rs (mod tests) does the same. Without the urlmon change, on a machine where Windows isn't in C:\Windows that check would pass whatever the policy said. media.rs tests on main already read SystemRoot the same way, and no other hard-coded path to C:\Windows remains in a fixture. No production code changes. Relates to #1881.

CI: check passes.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 08:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/1950#issuecomment-7156907136) <!-- victory-triage v1 head=dee931a554633a19bb0c3492deaa297aa46619a5 verdict=merge-candidate at=2026-11-25T08:20:25Z --> Automated triage for the maintainers. **Merge candidate.** Changes tests only. Three fixtures copied `version.dll` from a hard-coded `C:\Windows\System32`, and these now build the path from `SystemRoot`: `ignores_dlls_in_current_folder` in `crates/victory-hle/tests/no_dll_planting.rs`, and two tests in `crates/victory-loader/tests/load_probe.rs` through a new `host_dll()`. The urlmon policy check in `kernel.rs` (`mod tests`) does the same. Without the urlmon change, on a machine where Windows isn't in `C:\Windows` that check would pass whatever the policy said. `media.rs` tests on `main` already read `SystemRoot` the same way, and no other hard-coded path to `C:\Windows` remains in a fixture. No production code changes. Relates to #1881. CI: `check` passes. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

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

Independent local validation (Windows, Rust 1.100.0/MSVC, head dee931a, no game data): cargo test --locked -p victory-hle --test no_dll_planting -> 1 test passed (ignores_dlls_in_current_folder), exit 0; cargo test --locked -p victory-loader --test load_probe -> 2 tests passed, exit 0; cargo test --locked -p victory-hle modules::kernel::tests -> 5 tests passed, exit 0 (the shorter kernel::tests filter matched 0, so use the full path). SystemRoot is set in this Windows environment. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only tests). No game data used.

**@⁠cloph-dsp** on GitHub · 2026-11-25 11:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/1950#issuecomment-7160663480) Independent local validation (Windows, Rust 1.100.0/MSVC, head dee931a, no game data): `cargo test --locked -p victory-hle --test no_dll_planting` -> 1 test passed (`ignores_dlls_in_current_folder`), exit 0; `cargo test --locked -p victory-loader --test load_probe` -> 2 tests passed, exit 0; `cargo test --locked -p victory-hle modules::kernel::tests` -> 5 tests passed, exit 0 (the shorter `kernel::tests` filter matched 0, so use the full path). SystemRoot is set in this Windows environment. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only tests). No game data used.
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!1950
No description provided.