Commit 1663454c authored by Sven Baars's avatar Sven Baars Committed by Alexandre Julliard

ntdll/tests: Update some more todos that succeed with the new wow64 architecture.

parent 06b958d5
......@@ -37,7 +37,6 @@ static NTSTATUS (WINAPI * pNtMapViewOfSection)(HANDLE,HANDLE,PVOID*,ULONG_PTR,SI
static NTSTATUS (WINAPI * pNtUnmapViewOfSection)(HANDLE,PVOID);
static NTSTATUS (WINAPI * pNtClose)(HANDLE);
static ULONG (WINAPI * pNtGetCurrentProcessorNumber)(void);
static BOOL (WINAPI * pIsWow64Process)(HANDLE, PBOOL);
static BOOL (WINAPI * pGetLogicalProcessorInformationEx)(LOGICAL_PROCESSOR_RELATIONSHIP,SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX*,DWORD*);
static DEP_SYSTEM_POLICY_TYPE (WINAPI * pGetSystemDEPPolicy)(void);
static NTSTATUS (WINAPI * pNtOpenThread)(HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES *, const CLIENT_ID *);
......@@ -49,6 +48,7 @@ static HANDLE (WINAPI * pDbgUiGetThreadDebugObject)(void);
static void (WINAPI * pDbgUiSetThreadDebugObject)(HANDLE);
static BOOL is_wow64;
static BOOL old_wow64;
/* one_before_last_pid is used to be able to compare values of a still running process
with the output of the test_query_process_times and test_query_process_handlecount tests.
......@@ -102,8 +102,18 @@ static void InitFunctionPtrs(void)
NTDLL_GET_PROC(DbgUiGetThreadDebugObject);
NTDLL_GET_PROC(DbgUiSetThreadDebugObject);
pIsWow64Process = (void *)GetProcAddress(hkernel32, "IsWow64Process");
if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE;
if (!IsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE;
if (is_wow64)
{
TEB64 *teb64 = ULongToPtr( NtCurrentTeb()->GdiBatchCount );
if (teb64)
{
PEB64 *peb64 = ULongToPtr(teb64->Peb);
old_wow64 = !peb64->LdrData;
}
}
pGetSystemDEPPolicy = (void *)GetProcAddress(hkernel32, "GetSystemDEPPolicy");
pGetLogicalProcessorInformationEx = (void *) GetProcAddress(hkernel32, "GetLogicalProcessorInformationEx");
......@@ -183,7 +193,7 @@ static void test_query_basic(void)
(void *)sbi.HighestUserAddress, (void *)sbi2.HighestUserAddress);
#else
ok( sbi.HighestUserAddress == (void *)0x7ffeffff, "wrong limit %p\n", sbi.HighestUserAddress);
todo_wine_if( is_wow64 )
todo_wine_if( old_wow64 )
ok( sbi2.HighestUserAddress == (is_wow64 ? (void *)0xfffeffff : (void *)0x7ffeffff),
"wrong limit %p\n", sbi.HighestUserAddress);
#endif
......@@ -206,7 +216,7 @@ static void test_query_basic(void)
broken(status == STATUS_INVALID_INFO_CLASS) || broken(status == STATUS_NOT_IMPLEMENTED),
"failed %lx\n", status );
if (!status || status == STATUS_INFO_LENGTH_MISMATCH)
todo_wine_if( is_wow64 )
todo_wine_if( old_wow64 )
ok( !status == !is_wow64, "got wrong status %lx wow64 %u\n", status, is_wow64 );
if (!status)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment