Bruno Jesus : ws2_32/tests: Add UDP select() test for unbound socket.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jun 16 10:13:13 CDT 2015
Module: wine
Branch: master
Commit: 213419961ce5095f5fd9ba9904ca82e7da71da67
URL: http://source.winehq.org/git/wine.git/?a=commit;h=213419961ce5095f5fd9ba9904ca82e7da71da67
Author: Bruno Jesus <00cpxxx at gmail.com>
Date: Mon Jun 15 10:10:20 2015 -0300
ws2_32/tests: Add UDP select() test for unbound socket.
---
dlls/ws2_32/tests/sock.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 610a563..7335faa 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -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
More information about the wine-cvs
mailing list