kernel32/tests: Add test for 'all processors' flag on Vista and newer.

This commit is contained in:
Erich Hoover 2010-02-19 19:07:57 -07:00 committed by Alexandre Julliard
parent fda39b207c
commit 2902d8090a
1 changed files with 5 additions and 1 deletions

View File

@ -780,7 +780,7 @@ static VOID test_GetThreadTimes(void)
static VOID test_thread_processor(void)
{
HANDLE curthread,curproc;
DWORD_PTR processMask,systemMask;
DWORD_PTR processMask,systemMask,retMask;
SYSTEM_INFO sysInfo;
int error=0;
BOOL is_wow64;
@ -803,6 +803,10 @@ static VOID test_thread_processor(void)
"SetThreadAffinityMask failed\n");
ok(SetThreadAffinityMask(curthread,processMask+1)==0,
"SetThreadAffinityMask passed for an illegal processor\n");
/* NOTE: Pre-Vista does not recognize the "all processors" flag (all bits set) */
retMask = SetThreadAffinityMask(curthread,~0UL);
ok(broken(retMask==0) || retMask==processMask,
"SetThreadAffinityMask(thread,-1) failed to request all processors.\n");
/* NOTE: This only works on WinNT/2000/XP) */
if (pSetThreadIdealProcessor) {
SetLastError(0xdeadbeef);