André Hentschel : ws2_32/tests: Test for initial state of SIOCATMARK.

Alexandre Julliard julliard at winehq.org
Tue Nov 10 09:39:15 CST 2009


Module: wine
Branch: master
Commit: 511c76dfdf9bd8a9ad3da9f9b8df5b2de92fb279
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=511c76dfdf9bd8a9ad3da9f9b8df5b2de92fb279

Author: André Hentschel <nerv at dawncrow.de>
Date:   Mon Nov  9 22:02:10 2009 +0100

ws2_32/tests: Test for initial state of SIOCATMARK.

---

 dlls/ws2_32/tests/sock.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 5975684..c17b894 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -2453,6 +2453,7 @@ static void test_ioctlsocket(void)
     int ret;
     static const LONG cmds[] = {FIONBIO, FIONREAD, SIOCATMARK};
     UINT i;
+    u_long arg = 0;
 
     sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
     ok(sock != INVALID_SOCKET, "Creating the socket failed: %d\n", WSAGetLastError());
@@ -2470,6 +2471,13 @@ static void test_ioctlsocket(void)
         ret = WSAGetLastError();
         ok(ret == WSAEFAULT, "expected WSAEFAULT, got %d instead\n", ret);
     }
+
+    /* A fresh and not connected socket has no urgent data, this test shows
+     * that normal(not urgent) data returns a non-zero value for SIOCATMARK. */
+
+    ret = ioctlsocket(sock, SIOCATMARK, &arg);
+    if(ret != SOCKET_ERROR)
+        todo_wine ok(arg, "expected a non-zero value\n");
 }
 
 static int drain_pause=0;




More information about the wine-cvs mailing list