Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com --- dlls/iphlpapi/tests/iphlpapi.c | 105 +++++++++++++++++++-------------- 1 file changed, 60 insertions(+), 45 deletions(-)
diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index 6cbe725bada..203aefb9f69 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -579,16 +579,21 @@ static void testGetIcmpStatisticsEx(void) }
apiReturn = GetIcmpStatisticsEx(&stats, AF_INET6); - ok(apiReturn == NO_ERROR || broken(apiReturn == ERROR_NOT_SUPPORTED), - "GetIcmpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn); - if (apiReturn == NO_ERROR && winetest_debug > 1) + if (!strcmp(winetest_platform, "wine") && apiReturn == ERROR_NOT_SUPPORTED) + skip("GetIcmpStatisticsEx(AF_INET6) not supported\n"); + else { - INT i; - trace( "ICMP IPv6 Ex stats: %8s %8s\n", "in", "out" ); - trace( " dwMsgs: %8u %8u\n", stats.icmpInStats.dwMsgs, stats.icmpOutStats.dwMsgs ); - trace( " dwErrors: %8u %8u\n", stats.icmpInStats.dwErrors, stats.icmpOutStats.dwErrors ); - for (i = 0; i < 256; i++) - trace( " rgdwTypeCount[%3i]: %8u %8u\n", i, stats.icmpInStats.rgdwTypeCount[i], stats.icmpOutStats.rgdwTypeCount[i] ); + ok(apiReturn == NO_ERROR || broken(apiReturn == ERROR_NOT_SUPPORTED), + "GetIcmpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn); + if (apiReturn == NO_ERROR && winetest_debug > 1) + { + INT i; + trace( "ICMP IPv6 Ex stats: %8s %8s\n", "in", "out" ); + trace( " dwMsgs: %8u %8u\n", stats.icmpInStats.dwMsgs, stats.icmpOutStats.dwMsgs ); + trace( " dwErrors: %8u %8u\n", stats.icmpInStats.dwErrors, stats.icmpOutStats.dwErrors ); + for (i = 0; i < 256; i++) + trace( " rgdwTypeCount[%3i]: %8u %8u\n", i, stats.icmpInStats.rgdwTypeCount[i], stats.icmpOutStats.rgdwTypeCount[i] ); + } } }
@@ -636,34 +641,39 @@ static void testGetIpStatisticsEx(void) }
apiReturn = GetIpStatisticsEx(&stats, AF_INET6); - ok(apiReturn == NO_ERROR || broken(apiReturn == ERROR_NOT_SUPPORTED), - "GetIpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn); - if (apiReturn == NO_ERROR && winetest_debug > 1) + if (!strcmp(winetest_platform, "wine") && apiReturn == ERROR_NOT_SUPPORTED) + skip("GetIpStatisticsEx(AF_INET6) not supported\n"); + else { - trace( "IP IPv6 Ex stats:\n" ); - trace( " dwForwarding: %u\n", U(stats).dwForwarding ); - trace( " dwDefaultTTL: %u\n", stats.dwDefaultTTL ); - trace( " dwInReceives: %u\n", stats.dwInReceives ); - trace( " dwInHdrErrors: %u\n", stats.dwInHdrErrors ); - trace( " dwInAddrErrors: %u\n", stats.dwInAddrErrors ); - trace( " dwForwDatagrams: %u\n", stats.dwForwDatagrams ); - trace( " dwInUnknownProtos: %u\n", stats.dwInUnknownProtos ); - trace( " dwInDiscards: %u\n", stats.dwInDiscards ); - trace( " dwInDelivers: %u\n", stats.dwInDelivers ); - trace( " dwOutRequests: %u\n", stats.dwOutRequests ); - trace( " dwRoutingDiscards: %u\n", stats.dwRoutingDiscards ); - trace( " dwOutDiscards: %u\n", stats.dwOutDiscards ); - trace( " dwOutNoRoutes: %u\n", stats.dwOutNoRoutes ); - trace( " dwReasmTimeout: %u\n", stats.dwReasmTimeout ); - trace( " dwReasmReqds: %u\n", stats.dwReasmReqds ); - trace( " dwReasmOks: %u\n", stats.dwReasmOks ); - trace( " dwReasmFails: %u\n", stats.dwReasmFails ); - trace( " dwFragOks: %u\n", stats.dwFragOks ); - trace( " dwFragFails: %u\n", stats.dwFragFails ); - trace( " dwFragCreates: %u\n", stats.dwFragCreates ); - trace( " dwNumIf: %u\n", stats.dwNumIf ); - trace( " dwNumAddr: %u\n", stats.dwNumAddr ); - trace( " dwNumRoutes: %u\n", stats.dwNumRoutes ); + ok(apiReturn == NO_ERROR || broken(apiReturn == ERROR_NOT_SUPPORTED), + "GetIpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn); + if (apiReturn == NO_ERROR && winetest_debug > 1) + { + trace( "IP IPv6 Ex stats:\n" ); + trace( " dwForwarding: %u\n", U(stats).dwForwarding ); + trace( " dwDefaultTTL: %u\n", stats.dwDefaultTTL ); + trace( " dwInReceives: %u\n", stats.dwInReceives ); + trace( " dwInHdrErrors: %u\n", stats.dwInHdrErrors ); + trace( " dwInAddrErrors: %u\n", stats.dwInAddrErrors ); + trace( " dwForwDatagrams: %u\n", stats.dwForwDatagrams ); + trace( " dwInUnknownProtos: %u\n", stats.dwInUnknownProtos ); + trace( " dwInDiscards: %u\n", stats.dwInDiscards ); + trace( " dwInDelivers: %u\n", stats.dwInDelivers ); + trace( " dwOutRequests: %u\n", stats.dwOutRequests ); + trace( " dwRoutingDiscards: %u\n", stats.dwRoutingDiscards ); + trace( " dwOutDiscards: %u\n", stats.dwOutDiscards ); + trace( " dwOutNoRoutes: %u\n", stats.dwOutNoRoutes ); + trace( " dwReasmTimeout: %u\n", stats.dwReasmTimeout ); + trace( " dwReasmReqds: %u\n", stats.dwReasmReqds ); + trace( " dwReasmOks: %u\n", stats.dwReasmOks ); + trace( " dwReasmFails: %u\n", stats.dwReasmFails ); + trace( " dwFragOks: %u\n", stats.dwFragOks ); + trace( " dwFragFails: %u\n", stats.dwFragFails ); + trace( " dwFragCreates: %u\n", stats.dwFragCreates ); + trace( " dwNumIf: %u\n", stats.dwNumIf ); + trace( " dwNumAddr: %u\n", stats.dwNumAddr ); + trace( " dwNumRoutes: %u\n", stats.dwNumRoutes ); + } } }
@@ -752,16 +762,21 @@ static void testGetUdpStatisticsEx(void) }
apiReturn = GetUdpStatisticsEx(&stats, AF_INET6); - ok(apiReturn == NO_ERROR || broken(apiReturn == ERROR_NOT_SUPPORTED), - "GetUdpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn); - if (apiReturn == NO_ERROR && winetest_debug > 1) + if (!strcmp(winetest_platform, "wine") && apiReturn == ERROR_NOT_SUPPORTED) + skip("GetUdpStatisticsEx(AF_INET6) not supported\n"); + else { - trace( "UDP IPv6 Ex stats:\n" ); - trace( " dwInDatagrams: %u\n", stats.dwInDatagrams ); - trace( " dwNoPorts: %u\n", stats.dwNoPorts ); - trace( " dwInErrors: %u\n", stats.dwInErrors ); - trace( " dwOutDatagrams: %u\n", stats.dwOutDatagrams ); - trace( " dwNumAddrs: %u\n", stats.dwNumAddrs ); + ok(apiReturn == NO_ERROR || broken(apiReturn == ERROR_NOT_SUPPORTED), + "GetUdpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn); + if (apiReturn == NO_ERROR && winetest_debug > 1) + { + trace( "UDP IPv6 Ex stats:\n" ); + trace( " dwInDatagrams: %u\n", stats.dwInDatagrams ); + trace( " dwNoPorts: %u\n", stats.dwNoPorts ); + trace( " dwInErrors: %u\n", stats.dwInErrors ); + trace( " dwOutDatagrams: %u\n", stats.dwOutDatagrams ); + trace( " dwNumAddrs: %u\n", stats.dwNumAddrs ); + } } }