Commit a0d386a3 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ws2_32/tests: Fix an intermittent test failure on w10pro64.

parent 0c361793
...@@ -3610,18 +3610,20 @@ static void test_select(void) ...@@ -3610,18 +3610,20 @@ static void test_select(void)
ok(FD_ISSET(fdWrite, &readfds), "fdWrite socket is not in the set\n"); ok(FD_ISSET(fdWrite, &readfds), "fdWrite socket is not in the set\n");
ret = recv(fdWrite, tmp_buf, sizeof(tmp_buf), 0); ret = recv(fdWrite, tmp_buf, sizeof(tmp_buf), 0);
ok(ret == 0, "expected 0, got %d\n", ret); ok(ret == 0, "expected 0, got %d\n", ret);
/* When a connection is attempted to a non-listening socket it will get to the except descriptor */
ret = closesocket(fdWrite); ret = closesocket(fdWrite);
ok(ret == 0, "expected 0, got %d\n", ret); ok(ret == 0, "expected 0, got %d\n", ret);
ret = closesocket(fdListen); ret = closesocket(fdListen);
ok(ret == 0, "expected 0, got %d\n", ret); ok(ret == 0, "expected 0, got %d\n", ret);
/* w10pro64 sometimes takes over 2 seconds for an error to be reported. */
if (winetest_interactive)
{
len = sizeof(address); len = sizeof(address);
fdWrite = setup_connector_socket(&address, len, TRUE); fdWrite = setup_connector_socket(&address, len, TRUE);
FD_ZERO_ALL(); FD_ZERO_ALL();
FD_SET(fdWrite, &writefds); FD_SET(fdWrite, &writefds);
FD_SET(fdWrite, &exceptfds); FD_SET(fdWrite, &exceptfds);
select_timeout.tv_sec = 2; /* requires more time to realize it will not connect */ select_timeout.tv_sec = 10;
ret = select(0, &readfds, &writefds, &exceptfds, &select_timeout); ret = select(0, &readfds, &writefds, &exceptfds, &select_timeout);
ok(ret == 1, "expected 1, got %d\n", ret); ok(ret == 1, "expected 1, got %d\n", ret);
len = sizeof(id); len = sizeof(id);
...@@ -3632,6 +3634,7 @@ static void test_select(void) ...@@ -3632,6 +3634,7 @@ static void test_select(void)
ok(FD_ISSET(fdWrite, &exceptfds), "fdWrite socket is not in the set\n"); ok(FD_ISSET(fdWrite, &exceptfds), "fdWrite socket is not in the set\n");
ok(select_timeout.tv_usec == 250000, "select timeout should not have changed\n"); ok(select_timeout.tv_usec == 250000, "select timeout should not have changed\n");
closesocket(fdWrite); closesocket(fdWrite);
}
/* Try select() on a closed socket after connection */ /* Try select() on a closed socket after connection */
tcp_socketpair(&fdRead, &fdWrite); tcp_socketpair(&fdRead, &fdWrite);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment