ws2_32: Return WSAEOPNOTSUPP in SIO_FLUSH.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-06-09 00:04:48 -05:00 committed by Alexandre Julliard
parent ee03ed09f6
commit b8bb6bae8f
2 changed files with 11 additions and 21 deletions

View File

@ -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 },

View File

@ -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)
{