fix(hle): skip unavailable host exports in net test #256

Closed
github-bot wants to merge 1 commit from gh-pr/256/head into gh-pr/256/base
Owner

@⁠CesarLopesO on GitHub · 2026-11-24 01:52 UTC · original
CesarLopesO:fix/win10-host-export-test → main · +4 −1 · 1 files · 1 commits · closed without merging

Summary

  • Skip host-export presence checks when the corresponding export is unavailable on the running Windows version.
  • Avoid failing only_loopback_is_reachable for HLE-provided APIs absent from older Windows releases.

Closes #118

Validation

  • rustfmt check: passed.
  • git diff --check: passed.
  • cargo test -p victory-hle --lib net: blocked on Debian by an unrelated compilation error in victory-gpu.
  • Windows 10 test was not independently reproduced.
**@⁠CesarLopesO** on GitHub · 2026-11-24 01:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/256) `CesarLopesO:fix/win10-host-export-test` → `main` · +4 −1 · 1 files · 1 commits · closed without merging ## Summary - Skip host-export presence checks when the corresponding export is unavailable on the running Windows version. - Avoid failing only_loopback_is_reachable for HLE-provided APIs absent from older Windows releases. Closes #118 ## Validation - rustfmt check: passed. - git diff --check: passed. - cargo test -p victory-hle --lib net: blocked on Debian by an unrelated compilation error in victory-gpu. - Windows 10 test was not independently reproduced.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:56:51 +00:00
github-bot closed this pull request 2026-11-26 03:56:51 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-24 05:56 UTC · original

Tested current PR head 4c57d95c6c15aac53f91a9cd803f586ec0a43eac.

  • cargo test --locked -p victory-hle --lib only_loopback_is_reachable -- --test-threads=1: 1 passed, 85 filtered out. The test allows a local loopback connection, expects a TEST-NET-1 destination to fail with WSAENETUNREACH, rejects external-name lookups, and checks numeric reverse lookup plus the ConnectEx extension path. Its export-validation loop now asserts the mapping only for host functions that are available (network test and export check).

Unavailable host exports are deliberately skipped, so this run does not validate their runtime resolution path. The test uses loopback and reserved TEST-NET-1 addresses; it does not require a game or outbound network access.

**@⁠jeremygold02** on GitHub · 2026-11-24 05:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/256#issuecomment-7123426607) Tested current PR head `4c57d95c6c15aac53f91a9cd803f586ec0a43eac`. - `cargo test --locked -p victory-hle --lib only_loopback_is_reachable -- --test-threads=1`: 1 passed, 85 filtered out. The test allows a local loopback connection, expects a TEST-NET-1 destination to fail with `WSAENETUNREACH`, rejects external-name lookups, and checks numeric reverse lookup plus the `ConnectEx` extension path. Its export-validation loop now asserts the mapping only for host functions that are available ([network test and export check](https://github.com/Marvisak/VIctory/blob/4c57d95c6c15aac53f91a9cd803f586ec0a43eac/crates/victory-hle/src/modules/net.rs#L898-L1067)). Unavailable host exports are deliberately skipped, so this run does not validate their runtime resolution path. The test uses loopback and reserved TEST-NET-1 addresses; it does not require a game or outbound network access.
Author
Owner

@⁠Exorion1er on GitHub · 2026-11-24 09:33 UTC · original

Both this PR and #349 change only_loopback_is_reachable for Windows 10 hosts without the newer winhttp exports (#118). #152 (merged 07:52 today) already does this on main: it skips the exports only when the host lacks them. Both PRs now conflict with main in that test, so I think both can be closed.

Checked by reading the diffs against main. AI-assisted (Claude Code).

**@⁠Exorion1er** on GitHub · 2026-11-24 09:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/256#issuecomment-7127572352) Both this PR and #349 change `only_loopback_is_reachable` for Windows 10 hosts without the newer winhttp exports (#118). #152 (merged 07:52 today) already does this on `main`: it skips the exports only when the host lacks them. Both PRs now conflict with `main` in that test, so I think both can be closed. Checked by reading the diffs against `main`. AI-assisted (Claude Code).

Pull request closed

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