ws2_32/tests: Add UDP select() test for unbound socket.

This commit is contained in:
Bruno Jesus 2015-06-15 10:10:20 -03:00 committed by Alexandre Julliard
parent f9a83377bc
commit 213419961c
1 changed files with 14 additions and 0 deletions

View File

@ -3868,6 +3868,20 @@ todo_wine
ok(GetLastError() == WSAENOTSOCK, "expected 10038, got %d\n", GetLastError());
WaitForSingleObject (thread_handle, 1000);
closesocket(fdRead);
/* test UDP behavior of unbound sockets */
select_timeout.tv_sec = 0;
select_timeout.tv_usec = 250000;
fdWrite = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
ok(fdWrite != INVALID_SOCKET, "socket call failed\n");
FD_ZERO_ALL();
FD_SET_ALL(fdWrite);
ret = select(0, &readfds, &writefds, &exceptfds, &select_timeout);
todo_wine
ok(ret == 1, "expected 1, got %d\n", ret);
todo_wine
ok(FD_ISSET(fdWrite, &writefds), "fdWrite socket is not in the set\n");
closesocket(fdWrite);
}
#undef FD_SET_ALL
#undef FD_ZERO_ALL