Sebastian Lackner : ntdll/tests: Allow broken SpinCount for some Win 8+ systems.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Feb 23 11:24:22 CST 2016


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

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Tue Feb 23 15:14:00 2016 +0100

ntdll/tests: Allow broken SpinCount for some Win 8+ systems.

Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/tests/rtl.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
index 1b17a7e..fc0d4b4 100644
--- a/dlls/ntdll/tests/rtl.c
+++ b/dlls/ntdll/tests/rtl.c
@@ -2075,8 +2075,9 @@ static void test_RtlInitializeCriticalSectionEx(void)
        "expected DebugInfo != NULL and DebugInfo != ~0, got %p\n", cs.DebugInfo);
     ok(cs.LockCount == -1, "expected LockCount == -1, got %d\n", cs.LockCount);
     ok(cs.RecursionCount == 0, "expected RecursionCount == 0, got %d\n", cs.RecursionCount);
-    ok(cs.LockSemaphore == 0, "expected LockSemaphore == 0, got %p\n", cs.LockSemaphore);
-    ok(cs.SpinCount == 0, "expected SpinCount == 0, got %ld\n", cs.SpinCount);
+    ok(cs.LockSemaphore == NULL, "expected LockSemaphore == NULL, got %p\n", cs.LockSemaphore);
+    ok(cs.SpinCount == 0 || broken(cs.SpinCount != 0) /* >= Win 8 */,
+       "expected SpinCount == 0, got %ld\n", cs.SpinCount);
     RtlDeleteCriticalSection(&cs);
 
     memset(&cs, 0x11, sizeof(cs));
@@ -2085,7 +2086,7 @@ static void test_RtlInitializeCriticalSectionEx(void)
     ok(cs.DebugInfo == no_debug, "expected DebugInfo == ~0, got %p\n", cs.DebugInfo);
     ok(cs.LockCount == -1, "expected LockCount == -1, got %d\n", cs.LockCount);
     ok(cs.RecursionCount == 0, "expected RecursionCount == 0, got %d\n", cs.RecursionCount);
-    ok(cs.LockSemaphore == 0, "expected LockSemaphore == 0, got %p\n", cs.LockSemaphore);
+    ok(cs.LockSemaphore == NULL, "expected LockSemaphore == NULL, got %p\n", cs.LockSemaphore);
     ok(cs.SpinCount == 0 || broken(cs.SpinCount != 0) /* >= Win 8 */,
        "expected SpinCount == 0, got %ld\n", cs.SpinCount);
     RtlDeleteCriticalSection(&cs);




More information about the wine-cvs mailing list