[PATCH 1/6] ws2_32/tests: Test passing an output buffer to FIONBIO.

Zebediah Figura z.figura12 at gmail.com
Mon Jun 7 19:53:07 CDT 2021


Signed-off-by: Zebediah Figura <z.figura12 at gmail.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 e99faa4096b..26ad716dbe3 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -3899,6 +3899,7 @@ static void test_fionbio(void)
     u_long one = 1, zero = 0;
     HANDLE port, event;
     ULONG_PTR key;
+    void *output;
     DWORD size;
     SOCKET s;
     int ret;
@@ -3931,6 +3932,11 @@ static void test_fionbio(void)
     ret = WSAIoctl(s, FIONBIO, &one, sizeof(one) + 1, NULL, 0, &size, NULL, NULL);
     ok(!ret, "got error %u\n", WSAGetLastError());
 
+    output = VirtualAlloc(NULL, 4, MEM_RESERVE | MEM_COMMIT, PAGE_NOACCESS);
+    ret = WSAIoctl(s, FIONBIO, &one, sizeof(one) + 1, output, 4, &size, NULL, NULL);
+    todo_wine ok(!ret, "got error %u\n", WSAGetLastError());
+    VirtualFree(output, 0, MEM_FREE);
+
     overlapped.Internal = 0xdeadbeef;
     overlapped.InternalHigh = 0xdeadbeef;
     size = 0xdeadbeef;
-- 
2.32.0




More information about the wine-devel mailing list