Alexandre Julliard : iphlpapi/tests: Avoid test failures when IPv6 is not supported.

Alexandre Julliard julliard at winehq.org
Thu May 3 14:23:46 CDT 2012


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu May  3 10:10:45 2012 +0200

iphlpapi/tests: Avoid test failures when IPv6 is not supported.

---

 dlls/iphlpapi/tests/iphlpapi.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c
index 188528e..aabcf04 100644
--- a/dlls/iphlpapi/tests/iphlpapi.c
+++ b/dlls/iphlpapi/tests/iphlpapi.c
@@ -552,7 +552,8 @@ static void testGetIcmpStatisticsEx(void)
     }
 
     apiReturn = pGetIcmpStatisticsEx(&stats, AF_INET6);
-    ok(apiReturn == NO_ERROR, "GetIcmpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
+    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;
@@ -610,7 +611,8 @@ static void testGetIpStatisticsEx(void)
     }
 
     apiReturn = pGetIpStatisticsEx(&stats, AF_INET6);
-    ok(apiReturn == NO_ERROR, "GetIpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
+    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 Ex stats:\n" );
@@ -678,7 +680,8 @@ static void testGetTcpStatisticsEx(void)
     }
 
     apiReturn = pGetTcpStatisticsEx(&stats, AF_INET6);
-    ok(apiReturn == NO_ERROR, "GetTcpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
+    ok(apiReturn == NO_ERROR || broken(apiReturn == ERROR_NOT_SUPPORTED),
+       "GetTcpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
     if (apiReturn == NO_ERROR && winetest_debug > 1)
     {
         trace( "TCP stats:\n" );
@@ -728,7 +731,8 @@ static void testGetUdpStatisticsEx(void)
     }
 
     apiReturn = pGetUdpStatisticsEx(&stats, AF_INET6);
-    ok(apiReturn == NO_ERROR, "GetUdpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
+    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 stats:\n" );




More information about the wine-cvs mailing list