Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ws2_32/socket.c | 115 ++++++++++++++++++++++--------------------- 1 file changed, 58 insertions(+), 57 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 1b3ad2fa6d0..7493b9e9f87 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3428,63 +3428,64 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID return ret ? -1 : 0; }
- case WS_SIO_ROUTING_INTERFACE_QUERY: - { - struct WS_sockaddr *daddr = (struct WS_sockaddr *)in_buff; - struct WS_sockaddr_in *daddr_in = (struct WS_sockaddr_in *)daddr; - struct WS_sockaddr_in *saddr_in = out_buff; - MIB_IPFORWARDROW row; - PMIB_IPADDRTABLE ipAddrTable = NULL; - DWORD size, i, found_index; - - TRACE("-> WS_SIO_ROUTING_INTERFACE_QUERY request\n"); - - if (!in_buff || in_size < sizeof(struct WS_sockaddr) || - !out_buff || out_size < sizeof(struct WS_sockaddr_in)) - { - SetLastError(WSAEFAULT); - return SOCKET_ERROR; - } - if (daddr->sa_family != WS_AF_INET) - { - FIXME("unsupported address family %d\n", daddr->sa_family); - status = WSAEAFNOSUPPORT; - break; - } - if (GetBestRoute(daddr_in->sin_addr.S_un.S_addr, 0, &row) != NOERROR || - GetIpAddrTable(NULL, &size, FALSE) != ERROR_INSUFFICIENT_BUFFER) - { - status = WSAEFAULT; - break; - } - ipAddrTable = HeapAlloc(GetProcessHeap(), 0, size); - if (GetIpAddrTable(ipAddrTable, &size, FALSE)) - { - HeapFree(GetProcessHeap(), 0, ipAddrTable); - status = WSAEFAULT; - break; - } - for (i = 0, found_index = ipAddrTable->dwNumEntries; - i < ipAddrTable->dwNumEntries; i++) - { - if (ipAddrTable->table[i].dwIndex == row.dwForwardIfIndex) - found_index = i; - } - if (found_index == ipAddrTable->dwNumEntries) - { - ERR("no matching IP address for interface %d\n", - row.dwForwardIfIndex); - HeapFree(GetProcessHeap(), 0, ipAddrTable); - status = WSAEFAULT; - break; - } - saddr_in->sin_family = WS_AF_INET; - saddr_in->sin_addr.S_un.S_addr = ipAddrTable->table[found_index].dwAddr; - saddr_in->sin_port = 0; - total = sizeof(struct WS_sockaddr_in); - HeapFree(GetProcessHeap(), 0, ipAddrTable); - break; - } + case WS_SIO_ROUTING_INTERFACE_QUERY: + { + struct WS_sockaddr *daddr = (struct WS_sockaddr *)in_buff; + struct WS_sockaddr_in *daddr_in = (struct WS_sockaddr_in *)daddr; + struct WS_sockaddr_in *saddr_in = out_buff; + MIB_IPFORWARDROW row; + PMIB_IPADDRTABLE ipAddrTable = NULL; + DWORD size, i, found_index; + + TRACE( "-> WS_SIO_ROUTING_INTERFACE_QUERY request\n" ); + + if (!in_buff || in_size < sizeof(struct WS_sockaddr) || + !out_buff || out_size < sizeof(struct WS_sockaddr_in)) + { + SetLastError( WSAEFAULT ); + return -1; + } + if (daddr->sa_family != WS_AF_INET) + { + FIXME("unsupported address family %d\n", daddr->sa_family); + status = WSAEAFNOSUPPORT; + break; + } + if (GetBestRoute( daddr_in->sin_addr.S_un.S_addr, 0, &row ) != NOERROR || + GetIpAddrTable( NULL, &size, FALSE ) != ERROR_INSUFFICIENT_BUFFER) + { + status = WSAEFAULT; + break; + } + ipAddrTable = HeapAlloc( GetProcessHeap(), 0, size ); + if (GetIpAddrTable( ipAddrTable, &size, FALSE )) + { + HeapFree( GetProcessHeap(), 0, ipAddrTable ); + status = WSAEFAULT; + break; + } + for (i = 0, found_index = ipAddrTable->dwNumEntries; + i < ipAddrTable->dwNumEntries; i++) + { + if (ipAddrTable->table[i].dwIndex == row.dwForwardIfIndex) + found_index = i; + } + if (found_index == ipAddrTable->dwNumEntries) + { + ERR("no matching IP address for interface %d\n", + row.dwForwardIfIndex); + HeapFree( GetProcessHeap(), 0, ipAddrTable ); + status = WSAEFAULT; + break; + } + saddr_in->sin_family = WS_AF_INET; + saddr_in->sin_addr.S_un.S_addr = ipAddrTable->table[found_index].dwAddr; + saddr_in->sin_port = 0; + total = sizeof(struct WS_sockaddr_in); + HeapFree( GetProcessHeap(), 0, ipAddrTable ); + break; + } + case WS_SIO_SET_COMPATIBILITY_MODE: TRACE("WS_SIO_SET_COMPATIBILITY_MODE ignored\n"); status = WSAEOPNOTSUPP;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ws2_32/socket.c | 27 ++++++++++++++++----------- dlls/ws2_32/tests/sock.c | 21 +++++++++------------ 2 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 7493b9e9f87..6f111e263c2 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3435,7 +3435,8 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID struct WS_sockaddr_in *saddr_in = out_buff; MIB_IPFORWARDROW row; PMIB_IPADDRTABLE ipAddrTable = NULL; - DWORD size, i, found_index; + DWORD size, i, found_index, ret = 0; + NTSTATUS status = STATUS_SUCCESS;
TRACE( "-> WS_SIO_ROUTING_INTERFACE_QUERY request\n" );
@@ -3448,21 +3449,21 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID if (daddr->sa_family != WS_AF_INET) { FIXME("unsupported address family %d\n", daddr->sa_family); - status = WSAEAFNOSUPPORT; - break; + SetLastError( WSAEAFNOSUPPORT ); + return -1; } if (GetBestRoute( daddr_in->sin_addr.S_un.S_addr, 0, &row ) != NOERROR || GetIpAddrTable( NULL, &size, FALSE ) != ERROR_INSUFFICIENT_BUFFER) { - status = WSAEFAULT; - break; + SetLastError( WSAEFAULT ); + return -1; } ipAddrTable = HeapAlloc( GetProcessHeap(), 0, size ); if (GetIpAddrTable( ipAddrTable, &size, FALSE )) { HeapFree( GetProcessHeap(), 0, ipAddrTable ); - status = WSAEFAULT; - break; + SetLastError( WSAEFAULT ); + return -1; } for (i = 0, found_index = ipAddrTable->dwNumEntries; i < ipAddrTable->dwNumEntries; i++) @@ -3475,15 +3476,19 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID ERR("no matching IP address for interface %d\n", row.dwForwardIfIndex); HeapFree( GetProcessHeap(), 0, ipAddrTable ); - status = WSAEFAULT; - break; + SetLastError( WSAEFAULT ); + return -1; } saddr_in->sin_family = WS_AF_INET; saddr_in->sin_addr.S_un.S_addr = ipAddrTable->table[found_index].dwAddr; saddr_in->sin_port = 0; - total = sizeof(struct WS_sockaddr_in); HeapFree( GetProcessHeap(), 0, ipAddrTable ); - break; + + ret = server_ioctl_sock( s, IOCTL_AFD_WINE_COMPLETE_ASYNC, &status, sizeof(status), + NULL, 0, ret_size, overlapped, completion ); + if (!ret) *ret_size = sizeof(struct WS_sockaddr_in); + SetLastError( ret ); + return ret ? -1 : 0; }
case WS_SIO_SET_COMPATIBILITY_MODE: diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 3648fa2a329..055fdf8feae 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -7770,7 +7770,7 @@ static void test_sioRoutingInterfaceQuery(void) size = 0xdeadbeef; ret = WSAIoctl(sock, SIO_ROUTING_INTERFACE_QUERY, &in, sizeof(in), &out, sizeof(out), &size, NULL, NULL); ok(!ret, "expected failure\n"); - todo_wine ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError()); + ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError()); ok(size == sizeof(out), "got size %u\n", size); /* We expect the source address to be INADDR_LOOPBACK as well, but * there's no guarantee that a route to the loopback address exists, @@ -7801,15 +7801,15 @@ static void test_sioRoutingInterfaceQuery(void) overlapped.InternalHigh = 0xdeadbeef; ret = WSAIoctl(sock, SIO_ROUTING_INTERFACE_QUERY, &in, sizeof(in), &out, sizeof(out), &size, &overlapped, NULL); ok(!ret, "expected failure\n"); - todo_wine ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError()); + ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError()); ok(size == sizeof(out), "got size %u\n", size);
ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0); ok(ret, "got error %u\n", GetLastError()); - todo_wine ok(!size, "got size %u\n", size); + ok(!size, "got size %u\n", size); ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr); ok(!overlapped.Internal, "got status %#x\n", (NTSTATUS)overlapped.Internal); - todo_wine ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh); + ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh);
CloseHandle(port); closesocket(sock); @@ -7829,14 +7829,11 @@ static void test_sioRoutingInterfaceQuery(void) ok(size == sizeof(out), "got size %u\n", size);
ret = SleepEx(0, TRUE); - todo_wine ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); - if (ret == WAIT_IO_COMPLETION) - { - ok(apc_count == 1, "APC was called %u times\n", apc_count); - ok(!apc_error, "got APC error %u\n", apc_error); - ok(!apc_size, "got APC size %u\n", apc_size); - ok(apc_overlapped == &overlapped, "got APC overlapped %p\n", apc_overlapped); - } + ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); + ok(apc_count == 1, "APC was called %u times\n", apc_count); + ok(!apc_error, "got APC error %u\n", apc_error); + ok(!apc_size, "got APC size %u\n", apc_size); + ok(apc_overlapped == &overlapped, "got APC overlapped %p\n", apc_overlapped);
closesocket(sock); }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ws2_32/socket.c | 28 +++++++++++++++++++--------- dlls/ws2_32/tests/sock.c | 21 ++++++++++++--------- 2 files changed, 31 insertions(+), 18 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 6f111e263c2..3b68d2e6336 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3491,16 +3491,9 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID return ret ? -1 : 0; }
- case WS_SIO_SET_COMPATIBILITY_MODE: - TRACE("WS_SIO_SET_COMPATIBILITY_MODE ignored\n"); - status = WSAEOPNOTSUPP; - break; case WS_SIO_UDP_CONNRESET: FIXME("WS_SIO_UDP_CONNRESET stub\n"); break; - case 0x667e: /* Netscape tries hard to use bogus ioctl 0x667e */ - SetLastError(WSAEOPNOTSUPP); - return SOCKET_ERROR;
case WS_SIO_ADDRESS_LIST_CHANGE: { @@ -3515,8 +3508,25 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
default: FIXME( "unimplemented ioctl %s\n", debugstr_wsaioctl( code ) ); - status = WSAEOPNOTSUPP; - break; + /* fall through */ + case LOWORD(WS_FIONBIO): /* Netscape tries to use this */ + case WS_SIO_SET_COMPATIBILITY_MODE: + { + NTSTATUS status = STATUS_NOT_SUPPORTED; + + server_ioctl_sock( s, IOCTL_AFD_WINE_COMPLETE_ASYNC, &status, sizeof(status), + NULL, 0, ret_size, overlapped, completion ); + if (overlapped) + { + SetLastError( ERROR_IO_PENDING ); + } + else + { + *ret_size = 0; + SetLastError( WSAEOPNOTSUPP ); + } + return -1; + } }
if (completion) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 055fdf8feae..5b833ca8ba7 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -4139,7 +4139,7 @@ static void test_unsupported_ioctls(void) ok(ret == -1, "expected failure\n"); todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) ok(WSAGetLastError() == WSAEOPNOTSUPP, "got error %u\n", WSAGetLastError()); - todo_wine_if (codes[i] != SIO_FLUSH) + todo_wine_if (codes[i] == FIOASYNC) ok(!size, "got size %u\n", size);
WSASetLastError(0xdeadbeef); @@ -4149,24 +4149,25 @@ static void test_unsupported_ioctls(void) ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, NULL); todo_wine_if (codes[i] == SIO_FLUSH) ok(ret == -1, "expected failure\n"); - todo_wine ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); + todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); todo_wine_if (codes[i] == SIO_FLUSH) ok(size == 0xdeadbeef, "got size %u\n", size);
ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0); todo_wine_if (codes[i] == SIO_FLUSH) ok(!ret, "expected failure\n"); - todo_wine_if (codes[i] != 0xdeadbeef) + todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) ok(GetLastError() == ERROR_NOT_SUPPORTED, "got error %u\n", GetLastError()); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == 0x667e) + todo_wine_if (codes[i] == FIOASYNC) ok(!size, "got size %u\n", size); ok(key == 123, "got key %Iu\n", key); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == 0x667e) + todo_wine_if (codes[i] == FIOASYNC) ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr); - todo_wine_if (codes[i] != 0xdeadbeef) + todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) ok((NTSTATUS)overlapped.Internal == STATUS_NOT_SUPPORTED, "got status %#x\n", (NTSTATUS)overlapped.Internal); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == 0x667e) + todo_wine_if (codes[i] == FIOASYNC) ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh);
CloseHandle(port); @@ -4183,12 +4184,14 @@ static void test_unsupported_ioctls(void) ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, socket_apc); todo_wine_if (codes[i] == SIO_FLUSH) ok(ret == -1, "expected failure\n"); - todo_wine ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); + todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); todo_wine_if (codes[i] == SIO_FLUSH) ok(size == 0xdeadbeef, "got size %u\n", size);
ret = SleepEx(0, TRUE); - todo_wine ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); + todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); if (ret == WAIT_IO_COMPLETION) { ok(apc_count == 1, "APC was called %u times\n", apc_count);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ws2_32/socket.c | 4 ---- dlls/ws2_32/tests/sock.c | 28 +++++++++++----------------- 2 files changed, 11 insertions(+), 21 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 3b68d2e6336..08ea427913b 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3369,10 +3369,6 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID } }
- case WS_SIO_FLUSH: - FIXME("SIO_FLUSH: stub.\n"); - break; - case WS_SIO_GET_EXTENSION_FUNCTION_POINTER: { #define EXTENSION_FUNCTION(x, y) { x, y, #y }, diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 5b833ca8ba7..c654e442364 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -4135,9 +4135,8 @@ static void test_unsupported_ioctls(void) WSASetLastError(0xdeadbeef); size = 0xdeadbeef; ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, NULL, NULL); - todo_wine_if (codes[i] == SIO_FLUSH) - ok(ret == -1, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + ok(ret == -1, "expected failure\n"); + todo_wine_if (codes[i] == FIOASYNC) ok(WSAGetLastError() == WSAEOPNOTSUPP, "got error %u\n", WSAGetLastError()); todo_wine_if (codes[i] == FIOASYNC) ok(!size, "got size %u\n", size); @@ -4147,24 +4146,21 @@ static void test_unsupported_ioctls(void) overlapped.Internal = 0xdeadbeef; overlapped.InternalHigh = 0xdeadbeef; ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, NULL); - todo_wine_if (codes[i] == SIO_FLUSH) ok(ret == -1, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + todo_wine_if (codes[i] == FIOASYNC) ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); - todo_wine_if (codes[i] == SIO_FLUSH) - ok(size == 0xdeadbeef, "got size %u\n", size); + ok(size == 0xdeadbeef, "got size %u\n", size);
ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0); - todo_wine_if (codes[i] == SIO_FLUSH) - ok(!ret, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + ok(!ret, "expected failure\n"); + todo_wine_if (codes[i] == FIOASYNC) ok(GetLastError() == ERROR_NOT_SUPPORTED, "got error %u\n", GetLastError()); todo_wine_if (codes[i] == FIOASYNC) ok(!size, "got size %u\n", size); ok(key == 123, "got key %Iu\n", key); todo_wine_if (codes[i] == FIOASYNC) ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + todo_wine_if (codes[i] == FIOASYNC) ok((NTSTATUS)overlapped.Internal == STATUS_NOT_SUPPORTED, "got status %#x\n", (NTSTATUS)overlapped.Internal); todo_wine_if (codes[i] == FIOASYNC) @@ -4182,15 +4178,13 @@ static void test_unsupported_ioctls(void) apc_count = 0; size = 0xdeadbeef; ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, socket_apc); - todo_wine_if (codes[i] == SIO_FLUSH) - ok(ret == -1, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + ok(ret == -1, "expected failure\n"); + todo_wine_if (codes[i] == FIOASYNC) ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); - todo_wine_if (codes[i] == SIO_FLUSH) - ok(size == 0xdeadbeef, "got size %u\n", size); + ok(size == 0xdeadbeef, "got size %u\n", size);
ret = SleepEx(0, TRUE); - todo_wine_if (codes[i] == FIOASYNC || codes[i] == SIO_FLUSH) + todo_wine_if (codes[i] == FIOASYNC) ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); if (ret == WAIT_IO_COMPLETION) {
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=92106
Your paranoid android.
=== debiant2 (32 bit Hindi:India report) ===
ws2_32: sock.c:8154: Test succeeded inside todo block: GetQueuedCompletionStatus returned 0 sock.c:8155: Test succeeded inside todo block: Last error was 64
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ws2_32/socket.c | 5 ----- dlls/ws2_32/tests/sock.c | 45 ++++++++++++++-------------------------- 2 files changed, 16 insertions(+), 34 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 08ea427913b..a4d0e932eae 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3276,11 +3276,6 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID return ret ? -1 : 0; }
- case WS_FIOASYNC: - WARN("Warning: WS1.1 shouldn't be using async I/O\n"); - SetLastError(WSAEINVAL); - return SOCKET_ERROR; - case WS_SIO_GET_INTERFACE_LIST: { DWORD ret; diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index c654e442364..d9cb629caa4 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -4136,35 +4136,27 @@ static void test_unsupported_ioctls(void) size = 0xdeadbeef; ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, NULL, NULL); ok(ret == -1, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC) - ok(WSAGetLastError() == WSAEOPNOTSUPP, "got error %u\n", WSAGetLastError()); - todo_wine_if (codes[i] == FIOASYNC) - ok(!size, "got size %u\n", size); + ok(WSAGetLastError() == WSAEOPNOTSUPP, "got error %u\n", WSAGetLastError()); + ok(!size, "got size %u\n", size);
WSASetLastError(0xdeadbeef); size = 0xdeadbeef; overlapped.Internal = 0xdeadbeef; overlapped.InternalHigh = 0xdeadbeef; ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, NULL); - ok(ret == -1, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC) - ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); + ok(ret == -1, "expected failure\n"); + ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); ok(size == 0xdeadbeef, "got size %u\n", size);
ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped_ptr, 0); ok(!ret, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC) - ok(GetLastError() == ERROR_NOT_SUPPORTED, "got error %u\n", GetLastError()); - todo_wine_if (codes[i] == FIOASYNC) - ok(!size, "got size %u\n", size); + ok(GetLastError() == ERROR_NOT_SUPPORTED, "got error %u\n", GetLastError()); + ok(!size, "got size %u\n", size); ok(key == 123, "got key %Iu\n", key); - todo_wine_if (codes[i] == FIOASYNC) - ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr); - todo_wine_if (codes[i] == FIOASYNC) - ok((NTSTATUS)overlapped.Internal == STATUS_NOT_SUPPORTED, - "got status %#x\n", (NTSTATUS)overlapped.Internal); - todo_wine_if (codes[i] == FIOASYNC) - ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh); + ok(overlapped_ptr == &overlapped, "got overlapped %p\n", overlapped_ptr); + ok((NTSTATUS)overlapped.Internal == STATUS_NOT_SUPPORTED, + "got status %#x\n", (NTSTATUS)overlapped.Internal); + ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh);
CloseHandle(port); closesocket(s); @@ -4179,20 +4171,15 @@ static void test_unsupported_ioctls(void) size = 0xdeadbeef; ret = WSAIoctl(s, codes[i], NULL, 0, NULL, 0, &size, &overlapped, socket_apc); ok(ret == -1, "expected failure\n"); - todo_wine_if (codes[i] == FIOASYNC) - ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); + ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError()); ok(size == 0xdeadbeef, "got size %u\n", size);
ret = SleepEx(0, TRUE); - todo_wine_if (codes[i] == FIOASYNC) - ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); - if (ret == WAIT_IO_COMPLETION) - { - ok(apc_count == 1, "APC was called %u times\n", apc_count); - ok(apc_error == WSAEOPNOTSUPP, "got APC error %u\n", apc_error); - ok(!apc_size, "got APC size %u\n", apc_size); - ok(apc_overlapped == &overlapped, "got APC overlapped %p\n", apc_overlapped); - } + ok(ret == WAIT_IO_COMPLETION, "got %d\n", ret); + ok(apc_count == 1, "APC was called %u times\n", apc_count); + ok(apc_error == WSAEOPNOTSUPP, "got APC error %u\n", apc_error); + ok(!apc_size, "got APC size %u\n", apc_size); + ok(apc_overlapped == &overlapped, "got APC overlapped %p\n", apc_overlapped);
closesocket(s); winetest_pop_context();
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=92107
Your paranoid android.
=== debiant2 (32 bit WoW report) ===
ws2_32: sock.c:6861: Test failed: The wrong first client was accepted by acceptex: 2 != 1 sock.c:8141: Test succeeded inside todo block: GetQueuedCompletionStatus returned 0 sock.c:8142: Test succeeded inside todo block: Last error was 64