Repository navigation
Conversation
Dukestar69
left a comment
There was a problem hiding this comment.
Tested locally merged onto origin/main (63bcca4) on Windows 11 x64:
cargo test -p victory-hle net::tests: all tests passed.cargo clippy -p victory-hle --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
|
Automated triage for the maintainers. Merge candidate. In One small correction to the description: on CI: failing, but in Generated by Claude Code |
|
Tested on Wine: the Winsock fix works, but one test that passes on Environment: CachyOS kernel 7.3.5, Ryzen 5 9600X, RX 7600 XT, Wine 11.22,
Isolated runs,
So the lazy lookup does fix the WinSock override on Wine (that test goes from red to green), and the Is that expected from the change — the override module now loading where it used to fail the load, so a path that previously short-circuited now runs — or is it a real coupling to look at before merge? I can run any specific test or add logging if it helps. No game files or dumps, numbers only. |
fuzeofficlal
left a comment
There was a problem hiding this comment.
Verified 9b872b7a locally on Windows 11 x64:
cargo clippy --all-targets --locked -- -D warnings: clean (1.64s).cargo test -p xtask --locked policy::tests::repository_passes_policy: 1 passed, 0 failed (0.32s).cargo test -p victory-hle --locked: 154 passed, 0 failed (152lib +1fidelityfx +1no_dll_planting,15.51s).rustfmt --edition 2024 --check crates/victory-hle/src/modules/net.rs: clean.
The optional lookup fallbacks look sound: reachable/resolvable policy checks still run before the LazyLock export lookups, and the GetAddrInfoExA missing-export path sets WSAHOST_NOT_FOUND, clears *result via blocked_lookup(result), and returns the same error code.
One coverage gap worth addressing: the existing blocked.invalid test returns before export lookup, and only_loopback_is_reachable does not exercise WSAConnectByList, so neither new missing-export branch is directly covered by tests. Adding direct tests for the missing-export paths (and noting in the PR description that loopback inputs such as 127.0.0.1 / localhost are also refused when the host lacks these two exports) would make the fallback behavior verifiable.
Wine's ws2_32 has no WSAConnectByList and only the wide GetAddrInfoExW, so the overrides that forward to them panicked in the title. They now find the host function at run time: WSAConnectByList is refused when the host lacks it (there is no connection to make through it), and GetAddrInfoExA answers as a console without a network. The test that every override names a real export skips the ones the host itself lacks, as it already did for WinHttpGetProxySettingsEx.
9b872b7 to
9096166
Compare
|
Thanks both. @fuzeofficlal: I've added direct tests for the missing-export paths (amended, still one commit,
With both fallbacks broken on purpose, exactly the two new tests fail. The description now says that loopback targets are refused too when the exports are missing. @YaBulochka: I couldn't reproduce the AI-assisted (Claude); measured on my machine, no game data shared. |
fuzeofficlal
left a comment
There was a problem hiding this comment.
Reviewed 9096166b and verified on Windows 11: reachable/resolvable checks still execute before the optional LazyLock export lookups (crates/victory-hle/src/modules/net.rs:299-379, 630-709), missing WSAConnectByList/GetAddrInfoExA exports fall back to WSAENETUNREACH and WSAHOST_NOT_FOUND (clearing *result via blocked_lookup), present exports forward as before, and the new injected unit tests cover both missing-export and forwarding paths.
rustfmt --edition 2024 --check, xtask policy (191 files ok), cargo clippy -p victory-hle --all-targets -- -D warnings (default and --all-features), modules::net::tests (5/5), and the full victory-hle test suite (155 unit + 2 integration tests) all pass.
Split out of #2973, as asked in its review.
victory-hle's Winsock overrides resolveWSAConnectByListandGetAddrInfoExAfrom the host'sws2_32.dllwhen the module loads. Wine'sws2_32doesn't export them, so loading failed and every test that goes through the overrides failed with it. They are now looked up on first use. When the host has no export, the override refuses the call the way an unreachable network does (WSAENETUNREACHfor the connect, the existing blocked-lookup result for the name lookup).The loopback and
resolvablechecks still run before that fallback, so the offline guards are not loosened: nothing reaches the network that couldn't before.When the host lacks these exports, the call is refused even for loopback targets (
127.0.0.1,localhost): there is nothing to forward it to. On Windows both exports exist, so nothing changes there.Tested (Linux, GE-Proton11-14 Wine, RTX 5090):
victory-hletests undercargo xtask wine-test(#1218), 152 passed, 1 failed. The one failure isxgamesave::tests::a_kept_blob_past_the_link_limit_is_copied, an NTFS hard-link limit that Wine's filesystem doesn't have; #2973 skips it under Wine. I have no Windows machine; on Windows the exports exist, so the overrides behave as before.AI-assisted (Claude); measured on my machine, no game data shared.