advapi32: Correct tests under WOW64

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Sat Feb 11 18:37:29 CST 2012


Hi,


Changelog:
     advapi32: Correct tests under WOW64


Best Regards
  Alistair Leslie-Hughes
-------------- next part --------------
>From aae96cb18c79faa091def1e41152434b6ec0e30d Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Sun, 12 Feb 2012 11:22:03 +1100
Subject: [PATCH] Correct tests under WOW64
To: wine-patches <wine-patches at winehq.org>

---
 dlls/advapi32/tests/security.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 4cc1402..22c149f 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -1455,9 +1455,11 @@ static void test_token_attr(void)
     Size = 0;
     ret = GetTokenInformation(Token, TokenGroups, Groups, Size2, &Size);
     ok(Size > 1, "got %d\n", Size);
-    ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
-        "%d with error %d\n", ret, GetLastError());
-    ok(*((BYTE*)Groups) == 0xcc, "buffer altered\n");
+    /* WoW64 return TRUE with the LastError set */
+    ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "%d with error %d\n", ret, GetLastError());
+    if(!ret)
+        ok(*((BYTE*)Groups) == 0xcc, "buffer altered\n");
+
     HeapFree(GetProcessHeap(), 0, Groups);
 
     SetLastError(0xdeadbeef);
-- 
1.7.5.4



More information about the wine-patches mailing list