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

ws2_32/tests: Test selecting the same socket twice.

parent 9d7f41e7
......@@ -3272,6 +3272,16 @@ static void test_select(void)
ok(ret == 1, "select returned %d\n", ret);
ok(FD_ISSET(fdWrite, &writefds), "fdWrite socket is not in the set\n");
/* select the same socket twice */
writefds.fd_count = 2;
writefds.fd_array[0] = fdWrite;
writefds.fd_array[1] = fdWrite;
ret = select(0, NULL, &writefds, NULL, &select_timeout);
ok(ret == 1, "select returned %d\n", ret);
ok(writefds.fd_count == 1, "got count %u\n", writefds.fd_count);
ok(writefds.fd_array[0] == fdWrite, "got fd %#Ix\n", writefds.fd_array[0]);
ok(writefds.fd_array[1] == fdWrite, "got fd %#Ix\n", writefds.fd_array[1]);
/* tests for overlapping fd_set pointers */
FD_ZERO(&readfds);
FD_SET(fdWrite, &readfds);
......
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