From f18554c73572ef869940bb22fae54432990624b1 Mon Sep 17 00:00:00 2001 From: Austin Lund Date: Fri, 22 Oct 2010 15:49:38 +1000 Subject: [PATCH] advapi32/tests: Fix test for WoW64 handle size differences. --- dlls/advapi32/tests/security.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index f91ebb2bf97..edfecb9f499 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -1310,14 +1310,18 @@ static void test_token_attr(void) ret = GetTokenInformation(Token, TokenDefaultDacl, Dacl, Size, &Size2); ok(ret, "GetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); ok(Dacl->DefaultDacl == NULL, "expected NULL, got %p\n", Dacl->DefaultDacl); - ok(Size2 == sizeof(TOKEN_DEFAULT_DACL), "got %u expected sizeof(TOKEN_DEFAULT_DACL)\n", Size2); + ok(Size2 == sizeof(TOKEN_DEFAULT_DACL) || broken(Size2 == 2*sizeof(TOKEN_DEFAULT_DACL)), /* WoW64 */ + "got %u expected %u (sizeof(TOKEN_DEFAULT_DACL))\n", Size2, sizeof(TOKEN_DEFAULT_DACL)); Dacl->DefaultDacl = acl; ret = SetTokenInformation(Token, TokenDefaultDacl, Dacl, Size); ok(ret, "SetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); - ret = GetTokenInformation(Token, TokenDefaultDacl, Dacl, Size, &Size2); - ok(ret, "GetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); + if (Size2 == sizeof(TOKEN_DEFAULT_DACL)) { + ret = GetTokenInformation(Token, TokenDefaultDacl, Dacl, Size, &Size2); + ok(ret, "GetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); + } else + win_skip("TOKEN_DEFAULT_DACL size too small on WoW64\n"); HeapFree(GetProcessHeap(), 0, Dacl); CloseHandle(Token);