1*c2c66affSColin Finckdiff -pudN --strip-trailing-cr e:\wine\dlls\ws2_32\tests/sock.c e:\reactos\modules\rostests\winetests\ws2_32/sock.c 2*c2c66affSColin Finck--- e:\wine\dlls\ws2_32\tests/sock.c 2016-07-11 10:09:27 +0100 3*c2c66affSColin Finck+++ e:\reactos\modules\rostests\winetests\ws2_32/sock.c 2016-07-18 11:38:16 +0100 4*c2c66affSColin Finck@@ -3746,6 +3752,7 @@ static void test_select(void) 5*c2c66affSColin Finck ok(FD_ISSET(fdWrite, &readfds), "fdWrite socket is not in the set\n"); 6*c2c66affSColin Finck ok(FD_ISSET(fdRead, &readfds), "fdRead socket is not in the set\n"); 7*c2c66affSColin Finck 8*c2c66affSColin Finck+#if ROSTESTS_233_IS_FIXED 9*c2c66affSColin Finck while(1) { 10*c2c66affSColin Finck FD_ZERO(&writefds); 11*c2c66affSColin Finck FD_SET(fdWrite, &writefds); 12*c2c66affSColin Finck@@ -3753,6 +3760,8 @@ static void test_select(void) 13*c2c66affSColin Finck if(!ret) break; 14*c2c66affSColin Finck ok(send(fdWrite, tmp_buf, sizeof(tmp_buf), 0) > 0, "failed to send data\n"); 15*c2c66affSColin Finck } 16*c2c66affSColin Finck+#endif /* ROSTESTS_233_IS_FIXED */ 17*c2c66affSColin Finck+ 18*c2c66affSColin Finck FD_ZERO(&readfds); 19*c2c66affSColin Finck FD_SET(fdWrite, &readfds); 20*c2c66affSColin Finck FD_SET(fdRead, &readfds); 21*c2c66affSColin Finck@@ -3925,6 +3934,8 @@ todo_wine 22*c2c66affSColin Finck ok(exceptfds.fd_count == 2, "expected 2, got %d\n", exceptfds.fd_count); 23*c2c66affSColin Finck closesocket(fdWrite); 24*c2c66affSColin Finck 25*c2c66affSColin Finck+#if ROSTESTS_233_IS_FIXED 26*c2c66affSColin Finck+ 27*c2c66affSColin Finck /* Close the socket currently being selected in a thread - bug 38399 */ 28*c2c66affSColin Finck ok(!tcp_socketpair(&fdRead, &fdWrite), "creating socket pair failed\n"); 29*c2c66affSColin Finck thread_handle = CreateThread(NULL, 0, SelectCloseThread, &fdWrite, 0, &id); 30*c2c66affSColin Finck@@ -3951,6 +3962,8 @@ todo_wine 31*c2c66affSColin Finck WaitForSingleObject (thread_handle, 1000); 32*c2c66affSColin Finck closesocket(fdRead); 33*c2c66affSColin Finck 34*c2c66affSColin Finck+#endif /* ROSTESTS_233_IS_FIXED */ 35*c2c66affSColin Finck+ 36*c2c66affSColin Finck /* test UDP behavior of unbound sockets */ 37*c2c66affSColin Finck select_timeout.tv_sec = 0; 38*c2c66affSColin Finck select_timeout.tv_usec = 250000; 39*c2c66affSColin Finck@@ -4467,10 +4480,12 @@ static void test_dns(void) 40*c2c66affSColin Finck "hostent->h_addr_list[0] should be in %p, it is in %p\n", addr.mem, h->h_addr_list[0]); 41*c2c66affSColin Finck } 42*c2c66affSColin Finck 43*c2c66affSColin Finck+#ifndef __REACTOS__ 44*c2c66affSColin Finck /* Our winsock headers don't define gethostname because it conflicts with the 45*c2c66affSColin Finck * definition in unistd.h. Define it here to get rid of the warning. */ 46*c2c66affSColin Finck 47*c2c66affSColin Finck int WINAPI gethostname(char *name, int namelen); 48*c2c66affSColin Finck+#endif 49*c2c66affSColin Finck 50*c2c66affSColin Finck static void test_gethostbyname(void) 51*c2c66affSColin Finck { 52*c2c66affSColin Finck@@ -4489,17 +4504,24 @@ static void test_gethostbyname(void) 53*c2c66affSColin Finck 54*c2c66affSColin Finck he = gethostbyname(name); 55*c2c66affSColin Finck ok(he != NULL, "gethostbyname(\"%s\") failed: %d\n", name, WSAGetLastError()); 56*c2c66affSColin Finck- addr_list = (struct in_addr **)he->h_addr_list; 57*c2c66affSColin Finck- strcpy(first_ip, inet_ntoa(*addr_list[0])); 58*c2c66affSColin Finck- 59*c2c66affSColin Finck- trace("List of local IPs:\n"); 60*c2c66affSColin Finck- for(count = 0; addr_list[count] != NULL; count++) 61*c2c66affSColin Finck+#ifdef __REACTOS__ /* ROSTESTS-233 */ 62*c2c66affSColin Finck+ if (he != NULL) 63*c2c66affSColin Finck { 64*c2c66affSColin Finck- char *ip = inet_ntoa(*addr_list[count]); 65*c2c66affSColin Finck- if (!strcmp(ip, "127.0.0.1")) 66*c2c66affSColin Finck- local_ip = TRUE; 67*c2c66affSColin Finck- trace("%s\n", ip); 68*c2c66affSColin Finck+#endif 69*c2c66affSColin Finck+ addr_list = (struct in_addr **)he->h_addr_list; 70*c2c66affSColin Finck+ strcpy(first_ip, inet_ntoa(*addr_list[0])); 71*c2c66affSColin Finck+ 72*c2c66affSColin Finck+ trace("List of local IPs:\n"); 73*c2c66affSColin Finck+ for(count = 0; addr_list[count] != NULL; count++) 74*c2c66affSColin Finck+ { 75*c2c66affSColin Finck+ char *ip = inet_ntoa(*addr_list[count]); 76*c2c66affSColin Finck+ if (!strcmp(ip, "127.0.0.1")) 77*c2c66affSColin Finck+ local_ip = TRUE; 78*c2c66affSColin Finck+ trace("%s\n", ip); 79*c2c66affSColin Finck+ } 80*c2c66affSColin Finck+#ifdef __REACTOS__ /* ROSTESTS-233 */ 81*c2c66affSColin Finck } 82*c2c66affSColin Finck+#endif 83*c2c66affSColin Finck 84*c2c66affSColin Finck if (local_ip) 85*c2c66affSColin Finck { 86*c2c66affSColin Finck@@ -6839,7 +6861,7 @@ static void test_GetAddrInfoW(void) 87*c2c66affSColin Finck 88*c2c66affSColin Finck ret = pGetAddrInfoW(empty, NULL, NULL, &result2); 89*c2c66affSColin Finck ok(!ret, "GetAddrInfoW failed with %d\n", WSAGetLastError()); 90*c2c66affSColin Finck- ok(result != NULL, "GetAddrInfoW failed\n"); 91*c2c66affSColin Finck+ ok(result2 != NULL, "GetAddrInfoW failed\n"); 92*c2c66affSColin Finck compare_addrinfow(result, result2); 93*c2c66affSColin Finck pFreeAddrInfoW(result); 94*c2c66affSColin Finck pFreeAddrInfoW(result2); 95*c2c66affSColin Finck@@ -6850,7 +6872,7 @@ static void test_GetAddrInfoW(void) 96*c2c66affSColin Finck 97*c2c66affSColin Finck ret = pGetAddrInfoW(empty, empty, NULL, &result2); 98*c2c66affSColin Finck ok(!ret, "GetAddrInfoW failed with %d\n", WSAGetLastError()); 99*c2c66affSColin Finck- ok(result != NULL, "GetAddrInfoW failed\n"); 100*c2c66affSColin Finck+ ok(result2 != NULL, "GetAddrInfoW failed\n"); 101*c2c66affSColin Finck compare_addrinfow(result, result2); 102*c2c66affSColin Finck pFreeAddrInfoW(result); 103*c2c66affSColin Finck pFreeAddrInfoW(result2); 104*c2c66affSColin Finck@@ -7025,22 +7047,22 @@ static void test_getaddrinfo(void) 105*c2c66affSColin Finck * as if requesting with an empty host name. */ 106*c2c66affSColin Finck ret = pgetaddrinfo(name, NULL, NULL, &result); 107*c2c66affSColin Finck ok(!ret, "getaddrinfo failed with %d\n", WSAGetLastError()); 108*c2c66affSColin Finck- ok(result != NULL, "GetAddrInfoW failed\n"); 109*c2c66affSColin Finck+ ok(result != NULL, "getaddrinfo failed\n"); 110*c2c66affSColin Finck 111*c2c66affSColin Finck ret = pgetaddrinfo("", NULL, NULL, &result2); 112*c2c66affSColin Finck ok(!ret, "getaddrinfo failed with %d\n", WSAGetLastError()); 113*c2c66affSColin Finck- ok(result != NULL, "GetAddrInfoW failed\n"); 114*c2c66affSColin Finck+ ok(result2 != NULL, "getaddrinfo failed\n"); 115*c2c66affSColin Finck compare_addrinfo(result, result2); 116*c2c66affSColin Finck pfreeaddrinfo(result); 117*c2c66affSColin Finck pfreeaddrinfo(result2); 118*c2c66affSColin Finck 119*c2c66affSColin Finck ret = pgetaddrinfo(name, "", NULL, &result); 120*c2c66affSColin Finck ok(!ret, "getaddrinfo failed with %d\n", WSAGetLastError()); 121*c2c66affSColin Finck- ok(result != NULL, "GetAddrInfoW failed\n"); 122*c2c66affSColin Finck+ ok(result != NULL, "getaddrinfo failed\n"); 123*c2c66affSColin Finck 124*c2c66affSColin Finck ret = pgetaddrinfo("", "", NULL, &result2); 125*c2c66affSColin Finck ok(!ret, "getaddrinfo failed with %d\n", WSAGetLastError()); 126*c2c66affSColin Finck- ok(result != NULL, "GetAddrInfoW failed\n"); 127*c2c66affSColin Finck+ ok(result2 != NULL, "getaddrinfo failed\n"); 128*c2c66affSColin Finck compare_addrinfo(result, result2); 129*c2c66affSColin Finck pfreeaddrinfo(result); 130*c2c66affSColin Finck pfreeaddrinfo(result2); 131*c2c66affSColin Finck@@ -9539,6 +9561,14 @@ todo_wine 132*c2c66affSColin Finck todo_wine 133*c2c66affSColin Finck ok(error == WSAEFAULT, "Expected 10014, got %u\n", error); 134*c2c66affSColin Finck 135*c2c66affSColin Finck+#ifdef __REACTOS__ /* ROSTESTS-233 */ 136*c2c66affSColin Finck+ if (!blen) 137*c2c66affSColin Finck+ { 138*c2c66affSColin Finck+ skip("Failed to get length needed for name space providers.\n"); 139*c2c66affSColin Finck+ return; 140*c2c66affSColin Finck+ } 141*c2c66affSColin Finck+#endif 142*c2c66affSColin Finck+ 143*c2c66affSColin Finck name = HeapAlloc(GetProcessHeap(), 0, blen); 144*c2c66affSColin Finck if (!name) 145*c2c66affSColin Finck { 146*c2c66affSColin Finck@@ -9616,6 +9646,14 @@ todo_wine 147*c2c66affSColin Finck todo_wine 148*c2c66affSColin Finck ok(error == WSAEFAULT, "Expected 10014, got %u\n", error); 149*c2c66affSColin Finck 150*c2c66affSColin Finck+#ifdef __REACTOS__ /* ROSTESTS-233 */ 151*c2c66affSColin Finck+ if (!blen) 152*c2c66affSColin Finck+ { 153*c2c66affSColin Finck+ skip("Failed to get length needed for name space providers.\n"); 154*c2c66affSColin Finck+ return; 155*c2c66affSColin Finck+ } 156*c2c66affSColin Finck+#endif 157*c2c66affSColin Finck+ 158*c2c66affSColin Finck name = HeapAlloc(GetProcessHeap(), 0, blen); 159*c2c66affSColin Finck if (!name) 160*c2c66affSColin Finck { 161