Bruno Jesus : ws2_32/tests: Skip part of OOB test to unfreeze NT4 test.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Mar 31 10:38:50 CDT 2015


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

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Tue Mar 31 00:06:40 2015 -0300

ws2_32/tests: Skip part of OOB test to unfreeze NT4 test.

NT4 doesn't care about OOB_INLINE and receives data in the wrong recv
call so the next call never receives data and hangs forever. Skip it
to resume NT4 test normally.

---

 dlls/ws2_32/tests/sock.c | 34 ++++++++++++++++++++--------------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 188e25c..533e58c 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -3741,11 +3741,14 @@ static void test_select(void)
     tmp_buf[0] = 0xAF;
     SetLastError(0xdeadbeef);
     ret = recv(fdRead, tmp_buf, sizeof(tmp_buf), MSG_OOB);
-    ok(ret == SOCKET_ERROR, "expected -1, got %d\n", ret); /* can't recv with MSG_OOB if OOBINLINED */
-    ok(GetLastError() == WSAEINVAL, "expected 10022, got %d\n", GetLastError());
-    ret = recv(fdRead, tmp_buf, sizeof(tmp_buf), 0);
-    ok(ret == 1, "expected 1, got %d\n", ret);
-    ok(tmp_buf[0] == 'A', "expected 'A', got 0x%02X\n", tmp_buf[0]);
+    if (ret == SOCKET_ERROR) /* can't recv with MSG_OOB if OOBINLINED */
+    {
+        ok(GetLastError() == WSAEINVAL, "expected 10022, got %d\n", GetLastError());
+        ret = recv(fdRead, tmp_buf, sizeof(tmp_buf), 0);
+        ok(ret == 1, "expected 1, got %d\n", ret);
+        ok(tmp_buf[0] == 'A', "expected 'A', got 0x%02X\n", tmp_buf[0]);
+    }
+    else ok(broken(ret == 1) /* <= NT4 */, "expected error, got 1\n");
 
     /* When the connection is closed the socket is set in the read descriptor */
     ret = closesocket(fdRead);
@@ -4724,15 +4727,18 @@ todo_wine
     i = MSG_OOB;
     SetLastError(0xdeadbeef);
     ret = recv(dst, &data, 1, i);
-    ok(ret == SOCKET_ERROR, "expected -1, got %d\n", ret);
-    ret = GetLastError();
-    ok(ret == WSAEINVAL, "expected 10022, got %d\n", ret);
-    bufs.len = sizeof(char);
-    bufs.buf = &data;
-    ret = WSARecv(dst, &bufs, 1, &bytes_rec, &i, NULL, NULL);
-    ok(ret == SOCKET_ERROR, "expected -1, got %d\n", ret);
-    ret = GetLastError();
-    ok(ret == WSAEINVAL, "expected 10022, got %d\n", ret);
+    if (ret == SOCKET_ERROR)
+    {
+        ret = GetLastError();
+        ok(ret == WSAEINVAL, "expected 10022, got %d\n", ret);
+        bufs.len = sizeof(char);
+        bufs.buf = &data;
+        ret = WSARecv(dst, &bufs, 1, &bytes_rec, &i, NULL, NULL);
+        ok(ret == SOCKET_ERROR, "expected -1, got %d\n", ret);
+        ret = GetLastError();
+        ok(ret == WSAEINVAL, "expected 10022, got %d\n", ret);
+    }
+    else ok(broken(ret == 1) /* <= NT4 */, "expected error, got 1\n");
 
     closesocket(dst);
     optval = 0xdeadbeef;




More information about the wine-cvs mailing list