Author: cwittich Date: Thu Mar 4 21:55:41 2010 New Revision: 45841
URL: http://svn.reactos.org/svn/reactos?rev=45841&view=rev Log: [IPHLPAPI_WINETEST] sync iphlpapi_winetest to wine 1.1.39
Modified: trunk/rostests/winetests/iphlpapi/iphlpapi.c
Modified: trunk/rostests/winetests/iphlpapi/iphlpapi.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/iphlpapi/iphlpap... ============================================================================== --- trunk/rostests/winetests/iphlpapi/iphlpapi.c [iso-8859-1] (original) +++ trunk/rostests/winetests/iphlpapi/iphlpapi.c [iso-8859-1] Thu Mar 4 21:55:41 2010 @@ -775,11 +775,12 @@ IpReleaseAddress IpRenewAddress */ -static void testWin98Functions(void) +static DWORD CALLBACK testWin98Functions(void *p) { testGetInterfaceInfo(); testGetAdaptersInfo(); testGetNetworkParams(); + return 0; }
static void testGetPerAdapterInfo(void) @@ -839,6 +840,7 @@ ret = gGetAdaptersAddresses(AF_UNSPEC, 0, NULL, NULL, NULL); ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", ret);
+ size = 0; ret = gGetAdaptersAddresses(AF_UNSPEC, 0, NULL, NULL, &size); ok(ret == ERROR_BUFFER_OVERFLOW, "expected ERROR_BUFFER_OVERFLOW, got %u\n", ret); if (ret != ERROR_BUFFER_OVERFLOW) return; @@ -849,16 +851,16 @@
while (!ret && winetest_debug > 1 && aa) { - trace("Length: %u\n", aa->Length); - trace("IfIndex: %u\n", aa->IfIndex); + trace("Length: %u\n", S(U(*aa)).Length); + trace("IfIndex: %u\n", S(U(*aa)).IfIndex); trace("Next: %p\n", aa->Next); trace("AdapterName: %s\n", aa->AdapterName); trace("FirstUnicastAddress: %p\n", aa->FirstUnicastAddress); ua = aa->FirstUnicastAddress; while (ua) { - trace("\tLength: %u\n", ua->Length); - trace("\tFlags: 0x%08x\n", ua->Flags); + trace("\tLength: %u\n", S(U(*ua)).Length); + trace("\tFlags: 0x%08x\n", S(U(*ua)).Flags); trace("\tNext: %p\n", ua->Next); trace("\tAddress.lpSockaddr: %p\n", ua->Address.lpSockaddr); trace("\tAddress.iSockaddrLength: %d\n", ua->Address.iSockaddrLength); @@ -894,9 +896,16 @@
loadIPHlpApi(); if (hLibrary) { + HANDLE thread; + testWin98OnlyFunctions(); testWinNT4Functions(); - testWin98Functions(); + + /* run testGetXXXX in two threads at once to make sure we don't crash in that case */ + thread = CreateThread(NULL, 0, testWin98Functions, NULL, 0, NULL); + testWin98Functions(NULL); + WaitForSingleObject(thread, INFINITE); + testWin2KFunctions(); test_GetAdaptersAddresses(); freeIPHlpApi();