From 3d02e9870a3cae7b0cbb339d37dbed0749c8441a Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 21 Jul 2023 20:02:16 -0500 Subject: [PATCH] httpapi/tests: Do not test that a local TCP port is closed. I suspect the intent of this test was to verify that httpapi really doesn't bind to that port. That HttpAddUrlToUrlGroup() fails implies this, but paranoia in a case like this is rarely unwarranted. However, this test cannot reliably succeed; some other operating system component may open a TCP port in the meantime, and it appears that on Windows 10 this does in fact happen. Since the goal of the test is just extra paranoia, I don't think it's worth keeping. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55127 --- dlls/httpapi/tests/httpapi.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/dlls/httpapi/tests/httpapi.c b/dlls/httpapi/tests/httpapi.c index fa412b1093a..9db21635d3a 100644 --- a/dlls/httpapi/tests/httpapi.c +++ b/dlls/httpapi/tests/httpapi.c @@ -1384,7 +1384,7 @@ static void test_v2_bound_port(void) WCHAR url[50]; HANDLE queue, dummy_queue; int ret; - SOCKET s, s2; + SOCKET s2; ret = pHttpCreateServerSession(version, &session, 0); ok(!ret, "Failed to create session, error %u.\n", ret); @@ -1421,12 +1421,6 @@ static void test_v2_bound_port(void) ret = pHttpSetUrlGroupProperty(group, HttpServerBindingProperty, &binding, sizeof(binding)); ok(!ret, "Failed to rebind request queue, error %u.\n", ret); - s = socket(AF_INET, SOCK_STREAM, 0); - ret = connect(s, (struct sockaddr *)&sockaddr, sizeof(sockaddr)); - ok(ret, "Connecting to socket succeeded, %lu.\n", GetLastError()); - ok(GetLastError() == WSAECONNREFUSED, "Unexpected error connecting to socket, %lu.\n", GetLastError()); - - closesocket(s); ret = pHttpCloseRequestQueue(dummy_queue); ok(!ret, "Failed to close queue handle, error %u.\n", ret); ret = pHttpCloseRequestQueue(queue);