HLE tests: Windows 10's winhttp.dll may lack WinHttpGetProxySettingsEx (#118) #349

Closed
justrealyme wants to merge 1 commit from upstream-pr/349 into main
justrealyme commented 2026-11-24 02:30:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by justrealyme on 2026-11-24T02:30:10Z.


Fixes #118.

What

only_loopback_is_reachable (in crates/victory-hle/src/modules/net.rs) checks that every function the net module overrides is also exported by the host DLL. Windows 10's winhttp.dll does not export WinHttpGetProxySettingsEx, so the test panics there.

The title always binds to our override, never to the host's function, so a missing host export does not matter at runtime. The test now skips the exports newer than the oldest supported host (a one-entry list, NEWER_THAN_WINDOWS_10) and still checks all the others.

Testing

  • rustfmt --check on the changed file passes.
  • Not yet compiled or run on Windows: the change was written in a Linux container, where the crate cannot be built. Will mark ready after cargo test -p victory-hle passes on Windows.

No game data involved. AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:issue:6573271228 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/349). Originally posted by [justrealyme](https://github.com/justrealyme) on 2026-11-24T02:30:10Z. --- Fixes #118. ## What `only_loopback_is_reachable` (in `crates/victory-hle/src/modules/net.rs`) checks that every function the net module overrides is also exported by the host DLL. Windows 10's `winhttp.dll` does not export `WinHttpGetProxySettingsEx`, so the test panics there. The title always binds to our override, never to the host's function, so a missing host export does not matter at runtime. The test now skips the exports newer than the oldest supported host (a one-entry list, `NEWER_THAN_WINDOWS_10`) and still checks all the others. ## Testing - `rustfmt --check` on the changed file passes. - Not yet compiled or run on Windows: the change was written in a Linux container, where the crate cannot be built. Will mark ready after `cargo test -p victory-hle` passes on Windows. No game data involved. AI-assisted (Claude Code).
jeremygold02 commented 2026-11-24 06:55:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T03:00:07Z.


Thanks @justrealyme and @Makto94. These changes address the same WinHttpGetProxySettingsEx test failure on hosts where the export is absent. #349 excludes the export unconditionally (diff); #152 skips it only when the host lacks it, so the test still checks the export where it exists (diff). That conditional behavior makes #152 the stronger candidate to keep if maintainers consolidate. Please preserve #349's report and credit in that decision. This is for maintainers to decide.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7120677665 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/349#issuecomment-7120677665). Originally posted by [jeremygold02](https://github.com/jeremygold02) on 2026-11-24T03:00:07Z. --- Thanks @justrealyme and @Makto94. These changes address the same `WinHttpGetProxySettingsEx` test failure on hosts where the export is absent. #349 excludes the export unconditionally ([diff](https://github.com/Marvisak/VIctory/pull/349/files)); #152 skips it only when the host lacks it, so the test still checks the export where it exists ([diff](https://github.com/Marvisak/VIctory/pull/152/files)). That conditional behavior makes #152 the stronger candidate to keep if maintainers consolidate. Please preserve #349's report and credit in that decision. This is for maintainers to decide.
mercuryVM commented 2026-11-24 08:02:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T07:10:58Z.

Review: APPROVED


Tested 14e78f8 on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (264 passed, 0 failed), including only_loopback_is_reachable. You wrote that it had not been run on Windows yet, so it now has.

  • Only WinHttpGetProxySettingsEx is exempt, and every other override is still asserted to exist, so a typo still fails the test. This is the right shape. #256 tries to fix the same #118 with a check that skips every missing export, which leaves the assert unreachable.
  • The comment explains why a missing host export is harmless: the title binds to our override.

No issues found.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:review:6035081477 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/349#pullrequestreview-6035081477). Originally posted by [mercuryVM](https://github.com/mercuryVM) on 2026-11-24T07:10:58Z. **Review:** APPROVED --- Tested 14e78f8 on Windows 11, RTX 5070, MSVC: `cargo test --workspace --no-fail-fast` passes (264 passed, 0 failed), including `only_loopback_is_reachable`. You wrote that it had not been run on Windows yet, so it now has. - Only `WinHttpGetProxySettingsEx` is exempt, and every other override is still asserted to exist, so a typo still fails the test. This is the right shape. #256 tries to fix the same #118 with a check that skips every missing export, which leaves the assert unreachable. - The comment explains why a missing host export is harmless: the title binds to our override. No issues found. AI-assisted (Claude Code).
upstream-sync closed this pull request 2026-11-24 15:02:44 +00:00

Pull request closed

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!349
No description provided.