pdh/tests: Fix tests for some 2k machines

André Hentschel nerv at dawncrow.de
Sun Dec 19 18:27:15 CST 2010


---
 dlls/pdh/tests/pdh.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/pdh/tests/pdh.c b/dlls/pdh/tests/pdh.c
index 094ad74..74ba8f0c 100644
--- a/dlls/pdh/tests/pdh.c
+++ b/dlls/pdh/tests/pdh.c
@@ -165,7 +165,8 @@ static void test_PdhAddCounterW( void )
     ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08x\n", ret);
 
     ret = PdhAddCounterW( NULL, percentage_processor_time, 0, NULL );
-    ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterW failed 0x%08x\n", ret);
+    ok(ret == PDH_INVALID_ARGUMENT || broken(ret == PDH_INVALID_HANDLE /* W2K */),
+       "PdhAddCounterW failed 0x%08x\n", ret);
 
     ret = PdhAddCounterW( NULL, percentage_processor_time, 0, &counter );
     ok(ret == PDH_INVALID_HANDLE, "PdhAddCounterW failed 0x%08x\n", ret);
@@ -177,7 +178,8 @@ static void test_PdhAddCounterW( void )
     ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterW failed 0x%08x\n", ret);
 
     ret = PdhAddCounterW( query, system_downtime, 0, &counter );
-    ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhAddCounterW failed 0x%08x\n", ret);
+    ok(ret == PDH_CSTATUS_NO_COUNTER || broken(ret == ERROR_CALL_NOT_IMPLEMENTED /* W2K */),
+       "PdhAddCounterW failed 0x%08x\n", ret);
     ok(!counter, "PdhAddCounterW failed %p\n", counter);
 
     ret = PdhAddCounterW( query, percentage_processor_time, 0, &counter );
@@ -330,7 +332,8 @@ static void test_PdhGetFormattedCounterValue( void )
     ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret);
 
     ret = PdhGetFormattedCounterValue( NULL, PDH_FMT_LARGE, NULL, NULL );
-    ok(ret == PDH_INVALID_ARGUMENT, "PdhGetFormattedCounterValue failed 0x%08x\n", ret);
+    ok(ret == PDH_INVALID_ARGUMENT || broken(ret == PDH_INVALID_HANDLE /* W2K */),
+       "PdhGetFormattedCounterValue failed 0x%08x\n", ret);
 
     ret = PdhGetFormattedCounterValue( NULL, PDH_FMT_LARGE, NULL, &value );
     ok(ret == PDH_INVALID_HANDLE, "PdhGetFormattedCounterValue failed 0x%08x\n", ret);
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list