As seen when running the tests in Docker without IPv6 support configured, see for instance https://test.winehq.org/data/64cca153292833151d1adeb185252ca57e2d1625/linux_....
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/ws2_32/tests/afd.c | 7 +++++++ dlls/ws2_32/tests/protocol.c | 5 +++-- dlls/ws2_32/tests/sock.c | 19 ++++++++++++++++--- 3 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/dlls/ws2_32/tests/afd.c b/dlls/ws2_32/tests/afd.c index b07fb40fe3f..d0191ba8dbf 100644 --- a/dlls/ws2_32/tests/afd.c +++ b/dlls/ws2_32/tests/afd.c @@ -2281,6 +2281,12 @@ static void test_bind(void) todo_wine ok(ret == STATUS_PENDING, "got %#x\n", ret); ret = WaitForSingleObject(event, 0); ok(!ret, "got %#x\n", ret); + if (io.Status == STATUS_INVALID_ADDRESS_COMPONENT) + { + skip("IPv6 not supported\n"); + closesocket(s); + goto cleanup; + } ok(!io.Status, "got %#lx\n", io.Status); ok(io.Information == sizeof(addr6), "got %#Ix\n", io.Information); ok(addr6.sin6_family == AF_INET6, "got family %u\n", addr6.sin6_family); @@ -2315,6 +2321,7 @@ static void test_bind(void) closesocket(s2); closesocket(s);
+cleanup: CloseHandle(event); free(params); } diff --git a/dlls/ws2_32/tests/protocol.c b/dlls/ws2_32/tests/protocol.c index 34c0dbb0858..069a59df7a7 100644 --- a/dlls/ws2_32/tests/protocol.c +++ b/dlls/ws2_32/tests/protocol.c @@ -2376,8 +2376,9 @@ static void test_getaddrinfo(void) } else { + todo_wine ok(ret == WSAHOST_NOT_FOUND, "getaddrinfo failed with %d\n", ret); - win_skip("getaddrinfo does not support IPV6\n"); + skip("getaddrinfo does not support IPV6\n"); }
hint.ai_flags = 0; @@ -2468,7 +2469,7 @@ static void test_getaddrinfo(void) ret = getaddrinfo("www.kernel.org", NULL, NULL, &result); ok(!ret, "getaddrinfo failed with %d\n", WSAGetLastError()); if (!has_ipv6_addr) - todo_wine ok(!ipv6_found(result), "IPv6 address is returned.\n"); + ok(!ipv6_found(result), "IPv6 address is returned.\n"); freeaddrinfo(result);
for (i = 0; i < ARRAY_SIZE(hinttests); i++) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 17298ca4136..1125d4519d3 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -2187,7 +2187,14 @@ static void test_reuseaddr(void) ok(s1 != INVALID_SOCKET, "got error %d.\n", WSAGetLastError());
rc = bind(s1, tests[i].addr_loopback, tests[i].addrlen); - ok(!rc, "got error %d.\n", WSAGetLastError()); + ok(!rc || (tests[i].domain == AF_INET6 && WSAGetLastError() == WSAEADDRNOTAVAIL), "got error %d.\n", WSAGetLastError()); + if (tests[i].domain == AF_INET6 && WSAGetLastError() == WSAEADDRNOTAVAIL) + { + skip("IPv6 not supported, skipping test\n"); + closesocket(s1); + winetest_pop_context(); + continue; + }
s2 = socket(tests[i].domain, SOCK_STREAM, 0); ok(s2 != INVALID_SOCKET, "got error %d.\n", WSAGetLastError()); @@ -2392,7 +2399,7 @@ static void test_reuseaddr(void) } } rc = bind(s[0], tests_exclusive[i].s[0].addr, tests_exclusive[i].s[0].addrlen); - ok(!rc, "got error %d.\n", WSAGetLastError()); + ok(!rc || (tests_exclusive[i].s[0].domain == AF_INET6 && WSAGetLastError() == WSAEADDRNOTAVAIL), "got error %d.\n", WSAGetLastError());
rc = bind(s[1], tests_exclusive[i].s[1].addr, tests_exclusive[i].s[1].addrlen);
@@ -2746,7 +2753,12 @@ static void test_ipv6_cmsg(void) ok(server != INVALID_SOCKET, "failed to create socket, error %u\n", WSAGetLastError());
rc = bind(server, (SOCKADDR *)&localhost, sizeof(localhost)); - ok(rc != SOCKET_ERROR, "bind failed, error %u\n", WSAGetLastError()); + ok(rc != SOCKET_ERROR || WSAGetLastError() == WSAEADDRNOTAVAIL, "bind failed, error %u\n", WSAGetLastError()); + if (WSAGetLastError() == WSAEADDRNOTAVAIL) + { + skip("IPv6 not supported, skipping test\n"); + goto cleanup; + } rc = connect(client, (SOCKADDR *)&localhost, sizeof(localhost)); ok(rc != SOCKET_ERROR, "connect failed, error %u\n", WSAGetLastError());
@@ -2820,6 +2832,7 @@ static void test_ipv6_cmsg(void) rc = setsockopt(server, IPPROTO_IPV6, IPV6_RECVTCLASS, (const char *)&off, sizeof(off)); ok(!rc, "failed to clear IPV6_RECVTCLASS, error %u\n", WSAGetLastError());
+cleanup: closesocket(server); closesocket(client); }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=131452
Your paranoid android.
=== debian11 (32 bit report) ===
ws2_32: protocol.c:2472: Test failed: IPv6 address is returned.
=== debian11 (32 bit ar:MA report) ===
ws2_32: protocol.c:2472: Test failed: IPv6 address is returned.
=== debian11 (32 bit de report) ===
ws2_32: protocol.c:2472: Test failed: IPv6 address is returned.
=== debian11 (32 bit fr report) ===
ws2_32: protocol.c:2472: Test failed: IPv6 address is returned.
=== debian11 (32 bit he:IL report) ===
ws2_32: protocol.c:2472: Test failed: IPv6 address is returned.
=== debian11 (32 bit hi:IN report) ===
ws2_32: protocol.c:2472: Test failed: IPv6 address is returned.
=== debian11 (32 bit ja:JP report) ===
ws2_32: protocol.c:2472: Test failed: IPv6 address is returned.
=== debian11 (32 bit zh:CN report) ===
ws2_32: protocol.c:2472: Test failed: IPv6 address is returned.
=== debian11b (32 bit WoW report) ===
ws2_32: protocol.c:2472: Test failed: IPv6 address is returned.
=== debian11b (64 bit WoW report) ===
ws2_32: protocol.c:2472: Test failed: IPv6 address is returned.