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

Merged
imjustprism merged 1 commit from upstream-pr/1950 into main 2026-11-25 21:52:43 +00:00
imjustprism commented 2026-11-25 01:38:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by imjustprism on 2026-11-25T01:38:58Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:issue:6595144337 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1950). Originally posted by [imjustprism](https://github.com/imjustprism) on 2026-11-25T01:38:58Z. --- 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
catminou4 commented 2026-11-25 03:02:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T02:10:43Z.

Review: COMMENTED


Static review only: victory-hle/loader Windows-only paths; source review of the diff.

Take the Windows folder of test fixtures…: loader+hle test fixture path fix — loader tests broken on macOS anyway (pre-existing).

<!-- greyfinch-sync:Marvisak/VIctory:review:6050615979 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1950#pullrequestreview-6050615979). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T02:10:43Z. **Review:** COMMENTED --- Static review only: victory-hle/loader Windows-only paths; source review of the diff. Take the Windows folder of test fixtures…: loader+hle test fixture path fix — loader tests broken on macOS anyway (pre-existing).
Marvisak commented 2026-11-25 09:06:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T08:20:34Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7156907136 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1950#issuecomment-7156907136). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T08:20:34Z. --- <!-- 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)_
cloph-dsp commented 2026-11-25 12:03:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-25T11:09:13Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7160663480 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1950#issuecomment-7160663480). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-25T11:09:13Z. --- 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.
upstream-sync closed this pull request 2026-11-25 22:03:17 +00:00
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1948
No description provided.