net: skip newer-Windows-only exports in only_loopback_is_reachable #152

Manually merged
github merged 2 commits from gh-pr/152/head into gh-pr/152/base 2026-11-26 03:52:21 +00:00
Owner

@⁠Makto94 on GitHub · 2026-11-24 00:59 UTC · original
Makto94:fix/net-test-win10 → main · +10 −6 · 1 files · 2 commits · merged 2026-11-24 07:52 UTC

Fixes #118.

only_loopback_is_reachable asserts that every HLE override names a real export of its host DLL. WinHttpGetProxySettingsEx is absent from Windows 10's winhttp.dll; the HLE supplies it itself (registry lookup runs before host resolution, lib.rs resolve), so the test panicked there for no real problem.

This adds a small allow-list of newer-Windows-only exports and skips them only when the host lacks them. Every other export is still checked, so a typo in an override name still fails the test (a blanket continue on any missing export would hide that).

Tested on Windows 11 with the pinned 1.98.1 toolchain:

  • cargo test -p victory-hle --lib → 86 passed, 0 failed
  • cargo clippy -p victory-hle --tests → no warnings in net.rs
  • rustfmt --check clean on net.rs

Not yet run on Windows 10 itself; the issue author's environment would confirm.

**@⁠Makto94** on GitHub · 2026-11-24 00:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/152) `Makto94:fix/net-test-win10` → `main` · +10 −6 · 1 files · 2 commits · merged 2026-11-24 07:52 UTC Fixes #118. `only_loopback_is_reachable` asserts that every HLE override names a real export of its host DLL. `WinHttpGetProxySettingsEx` is absent from Windows 10's `winhttp.dll`; the HLE supplies it itself (registry lookup runs before host resolution, `lib.rs` `resolve`), so the test panicked there for no real problem. This adds a small allow-list of newer-Windows-only exports and skips them **only when the host lacks them**. Every other export is still checked, so a typo in an override name still fails the test (a blanket `continue` on any missing export would hide that). Tested on Windows 11 with the pinned 1.98.1 toolchain: - `cargo test -p victory-hle --lib` → 86 passed, 0 failed - `cargo clippy -p victory-hle --tests` → no warnings in `net.rs` - `rustfmt --check` clean on `net.rs` Not yet run on Windows 10 itself; the issue author's environment would confirm.
WinHttpGetProxySettingsEx is absent from Windows 10's winhttp.dll, so the
host-presence assertion panicked there. The HLE supplies it itself; skip it
only when the host lacks it, keeping the check for every other export.

Fixes #118
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:52:20 +00:00
github manually merged commit 18b2716a2c into gh-pr/152/base 2026-11-26 03:52:21 +00:00
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 01:25 UTC · original

Tested fff664d under Wine 11.22 + vkd3d-proton 3.1 (Arch Linux x86_64, AMD RX 9060 XT, RADV 26.3.1), Windows build of victory-hle: the Windows 10 case is fixed, but Wine still fails on a different export.

  • victory_hle: 85 passed, 1 failed. The failure is still only_loopback_is_reachable:
    ws2_32.dll lacks WSAConnectByList   (net.rs:1066)
    
    Wine's ws2_32 is missing WSAConnectByList, so the allow-list (WinHttpGetProxySettingsEx only) does not cover it. If keeping the HLE suite green under Wine matters, adding WSAConnectByList to NEWER_WINDOWS_ONLY would do it; the test correctly still catches the missing-export case on Windows.
  • No other regression in the suite.

No game data used.

**@⁠DaviTostes** on GitHub · 2026-11-24 01:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/152#issuecomment-7119079354) Tested `fff664d` under **Wine 11.22 + vkd3d-proton 3.1** (Arch Linux x86_64, AMD RX 9060 XT, RADV 26.3.1), Windows build of `victory-hle`: **the Windows 10 case is fixed, but Wine still fails on a different export**. - `victory_hle`: **85 passed, 1 failed**. The failure is still `only_loopback_is_reachable`: ``` ws2_32.dll lacks WSAConnectByList (net.rs:1066) ``` Wine's `ws2_32` is missing `WSAConnectByList`, so the allow-list (`WinHttpGetProxySettingsEx` only) does not cover it. If keeping the HLE suite green under Wine matters, adding `WSAConnectByList` to `NEWER_WINDOWS_ONLY` would do it; the test correctly still catches the missing-export case on Windows. - No other regression in the suite. No game data used.
Author
Owner

@⁠derinsh0 on GitHub · 2026-11-24 01:59 UTC · original

Can confirm this resolved an error with winhttp.dll on Windows 10.

Previous result:

failures:

---- modules::net::tests::only_loopback_is_reachable stdout ----

thread 'modules::net::tests::only_loopback_is_reachable' (7584) panicked at crates\victory-hle\src\modules\net.rs:1058:13:
winhttp.dll lacks WinHttpGetProxySettingsEx
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    modules::net::tests::only_loopback_is_reachable

test result: FAILED. 85 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.35s

Passes building the tests with these changes.

#256 is a dupe with a minor variation in implementation.

**@⁠derinsh0** on GitHub · 2026-11-24 01:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/152#issuecomment-7119643467) Can confirm this resolved an error with winhttp.dll on Windows 10. Previous result: ``` failures: ---- modules::net::tests::only_loopback_is_reachable stdout ---- thread 'modules::net::tests::only_loopback_is_reachable' (7584) panicked at crates\victory-hle\src\modules\net.rs:1058:13: winhttp.dll lacks WinHttpGetProxySettingsEx note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace failures: modules::net::tests::only_loopback_is_reachable test result: FAILED. 85 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.35s ``` Passes building the tests with these changes. #256 is a dupe with a minor variation in implementation.
Author
Owner

@⁠erLCoder on GitHub · 2026-11-24 06:25 UTC · original

Tested PR head 18b2716a2c on Windows 10 Enterprise 22H2 (winhttp.dll 10.0.19041.4522), Rust 1.98.1.

cargo test --offline --locked -p victory-hle --features diagnostics --lib -- --nocapture --test-threads=1 passed 86/86, including only_loopback_is_reachable, with no skipped or filtered tests. The prior upstream build had failed that test because WinHttpGetProxySettingsEx is missing on this Windows installation.

No game launch was involved. AI-assisted test report.

**@⁠erLCoder** on GitHub · 2026-11-24 06:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/152#issuecomment-7123924213) Tested PR head 18b2716a2c73e37ed8db346bcc3dcc0479f4b632 on Windows 10 Enterprise 22H2 (winhttp.dll 10.0.19041.4522), Rust 1.98.1. `cargo test --offline --locked -p victory-hle --features diagnostics --lib -- --nocapture --test-threads=1` passed 86/86, including `only_loopback_is_reachable`, with no skipped or filtered tests. The prior upstream build had failed that test because `WinHttpGetProxySettingsEx` is missing on this Windows installation. No game launch was involved. AI-assisted test report.
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!152
No description provided.