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

ws2_32: Return WSAEOPNOTSUPP in SIO_FLUSH.

parent ee03ed09
......@@ -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 },
......
......@@ -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)
{
......
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