mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 05:50:37 +00:00
ws2_32/tests: Add more tests for iosb contents while a recv is pending.
This commit is contained in:
parent
25b05840d4
commit
da8defe5df
|
@ -1466,13 +1466,14 @@ static void test_recv(void)
|
||||||
IOCTL_AFD_RECV, ¶ms, sizeof(params) - 1, NULL, 0);
|
IOCTL_AFD_RECV, ¶ms, sizeof(params) - 1, NULL, 0);
|
||||||
ok(ret == STATUS_INVALID_PARAMETER, "got %#x\n", ret);
|
ok(ret == STATUS_INVALID_PARAMETER, "got %#x\n", ret);
|
||||||
|
|
||||||
memset(&io, 0, sizeof(io));
|
io.Status = 0xdeadbeef;
|
||||||
|
io.Information = 0xdeadbeef;
|
||||||
memset(buffer, 0xcc, sizeof(buffer));
|
memset(buffer, 0xcc, sizeof(buffer));
|
||||||
ret = NtDeviceIoControlFile((HANDLE)client, event, NULL, NULL, &io,
|
ret = NtDeviceIoControlFile((HANDLE)client, event, NULL, NULL, &io,
|
||||||
IOCTL_AFD_RECV, ¶ms, sizeof(params), NULL, 0);
|
IOCTL_AFD_RECV, ¶ms, sizeof(params), NULL, 0);
|
||||||
ok(ret == STATUS_PENDING, "got %#x\n", ret);
|
ok(ret == STATUS_PENDING, "got %#x\n", ret);
|
||||||
ok(!io.Status, "got status %#lx\n", io.Status);
|
ok(io.Status == 0xdeadbeef, "got status %#lx\n", io.Status);
|
||||||
ok(!io.Information, "got information %#Ix\n", io.Information);
|
ok(io.Information == 0xdeadbeef, "got information %#Ix\n", io.Information);
|
||||||
|
|
||||||
/* These structures need not remain valid. */
|
/* These structures need not remain valid. */
|
||||||
memset(¶ms, 0xcc, sizeof(params));
|
memset(¶ms, 0xcc, sizeof(params));
|
||||||
|
|
|
@ -12208,11 +12208,15 @@ static void test_nonblocking_async_recv(void)
|
||||||
|
|
||||||
memset(buffer, 0, sizeof(buffer));
|
memset(buffer, 0, sizeof(buffer));
|
||||||
WSASetLastError(0xdeadbeef);
|
WSASetLastError(0xdeadbeef);
|
||||||
|
overlapped.Internal = 0xdeadbeef;
|
||||||
|
overlapped.InternalHigh = 0xdeadbeef;
|
||||||
ret = WSARecv(client, &wsabuf, 1, NULL, &flags, &overlapped, NULL);
|
ret = WSARecv(client, &wsabuf, 1, NULL, &flags, &overlapped, NULL);
|
||||||
ok(ret == -1, "got %d\n", ret);
|
ok(ret == -1, "got %d\n", ret);
|
||||||
ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError());
|
ok(WSAGetLastError() == ERROR_IO_PENDING, "got error %u\n", WSAGetLastError());
|
||||||
ret = WaitForSingleObject((HANDLE)client, 0);
|
ret = WaitForSingleObject((HANDLE)client, 0);
|
||||||
ok(ret == WAIT_TIMEOUT, "expected timeout\n");
|
ok(ret == WAIT_TIMEOUT, "expected timeout\n");
|
||||||
|
ok(overlapped.Internal == STATUS_PENDING, "got status %#lx\n", (NTSTATUS)overlapped.Internal);
|
||||||
|
ok(overlapped.InternalHigh == 0xdeadbeef, "got size %Iu\n", overlapped.InternalHigh);
|
||||||
|
|
||||||
ret = send(server, "data", 4, 0);
|
ret = send(server, "data", 4, 0);
|
||||||
ok(ret == 4, "got %d\n", ret);
|
ok(ret == 4, "got %d\n", ret);
|
||||||
|
|
Loading…
Reference in a new issue