[1/5] ws2_32/tests: Move second WSACleanup test elsewhere
Bruno Jesus
00cpxxx at gmail.com
Sat Mar 7 22:05:45 CST 2015
Remove the crash from Windows test machines.
Superseeds the previous series of 4 patches starting at 109673
-------------- next part --------------
---
dlls/ws2_32/tests/sock.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 7155a09..6ad4265 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -1124,7 +1124,14 @@ static void test_WithWSAStartup(void)
closesocket(src);
closesocket(dst);
- WSACleanup();
+ res = WSACleanup();
+ ok(res == 0, "expected 0, got %d\n", res);
+ WSASetLastError(0xdeadbeef);
+ res = WSACleanup();
+ error = WSAGetLastError();
+ ok ( (res == SOCKET_ERROR && error == WSANOTINITIALISED) ||
+ broken(res == 0), /* WinME */
+ "WSACleanup returned %d WSAGetLastError is %d\n", res, error);
}
/**************** Main program utility functions ***************/
@@ -1156,11 +1163,6 @@ static void Exit (void)
ret = WSACleanup();
err = WSAGetLastError();
ok ( ret == 0, "WSACleanup failed ret = %d GetLastError is %d\n", ret, err);
- ret = WSACleanup();
- err = WSAGetLastError();
- ok ( (ret == SOCKET_ERROR && err == WSANOTINITIALISED) ||
- broken(ret == 0), /* WinME */
- "WSACleanup returned %d GetLastError is %d\n", ret, err);
}
static void StartServer (LPTHREAD_START_ROUTINE routine,
--
1.8.3.2
More information about the wine-patches
mailing list