From: Zebediah Figura zfigura@codeweavers.com
--- dlls/ws2_32/tests/sock.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 418721a2541..4651bc09ec6 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -3900,6 +3900,7 @@ static void test_select(void) ret = getsockopt(fdWrite, SOL_SOCKET, SO_ERROR, (char*)&id, &len); ok(!ret, "getsockopt failed with %d\n", WSAGetLastError()); ok(id == 0, "expected 0, got %ld\n", id); + set_blocking(fdRead, FALSE);
/* When data is received the receiver gets the read descriptor */ ret = send(fdWrite, "1234", 4, 0); @@ -3960,6 +3961,11 @@ static void test_select(void) ok(ret == 1, "expected 1, got %d\n", ret); ok(tmp_buf[0] == 'A', "expected 'A', got 0x%02X\n", tmp_buf[0]);
+ /* work around some odd/buggy Linux behaviour */ + ret = recv(fdRead, tmp_buf, sizeof(tmp_buf), 0); + todo_wine ok(ret == -1, "got %d\n", ret); + todo_wine ok(GetLastError() == WSAEWOULDBLOCK, "got error %u\n", WSAGetLastError()); + /* When the connection is closed the socket is set in the read descriptor */ ret = closesocket(fdRead); ok(ret == 0, "expected 0, got %d\n", ret);