fix(hle): skip unavailable host exports in net test #256
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/256"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by CesarLopesO on 2026-11-24T01:52:45Z.
Summary
Closes #118
Validation
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T06:48:29Z.
Review: CHANGES_REQUESTED
Tested
4c57d95on Windows 11, RTX 5070, MSVC:cargo test -p victory-hle --lib net::passes (1 test).crates/victory-hle/src/modules/net.rs,only_loopback_is_reachable: the test can no longer fail. The newif crate::host::function(dll, e.name).is_none() { continue; }runs right before theassert!with the same condition. The assert only runs when the condition is true, so it never fires. A typo in an override name, or an export that is wrong for every Windows version, now passes silently. That is the case this check exists for.Suggested fix: skip only the exports known to be missing on older Windows, by name. For #118 that is the WinHTTP proxy call; #349 handles the same case for
WinHttpGetProxy.... Then keep asserting on the rest:AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T05:56:55Z.
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 withWSAENETUNREACH, rejects external-name lookups, and checks numeric reverse lookup plus theConnectExextension 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.
Imported from Marvisak/VIctory. Originally posted by Exorion1er on 2026-11-24T09:33:13Z.
Both this PR and #349 change
only_loopback_is_reachablefor Windows 10 hosts without the newer winhttp exports (#118). #152 (merged 07:52 today) already does this onmain: it skips the exports only when the host lacks them. Both PRs now conflict withmainin that test, so I think both can be closed.Checked by reading the diffs against
main. AI-assisted (Claude Code).Pull request closed