Commit 5314fac5 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32/tests: Fix affinity test when there are too many CPUs.

parent 8b7baa11
...@@ -956,12 +956,15 @@ static VOID test_thread_processor(void) ...@@ -956,12 +956,15 @@ static VOID test_thread_processor(void)
affinity_new.Mask, affinity.Mask); affinity_new.Mask, affinity.Mask);
/* show that the "all processors" flag is not supported for SetThreadGroupAffinity */ /* show that the "all processors" flag is not supported for SetThreadGroupAffinity */
if (sysInfo.dwNumberOfProcessors < 8 * sizeof(DWORD_PTR))
{
affinity_new.Group = 0; affinity_new.Group = 0;
affinity_new.Mask = ~0u; affinity_new.Mask = ~(DWORD_PTR)0;
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ok(!pSetThreadGroupAffinity(curthread, &affinity_new, NULL), "SetThreadGroupAffinity succeeded\n"); ok(!pSetThreadGroupAffinity(curthread, &affinity_new, NULL), "SetThreadGroupAffinity succeeded\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
}
affinity_new.Group = 1; /* assumes that you have less than 64 logical processors */ affinity_new.Group = 1; /* assumes that you have less than 64 logical processors */
affinity_new.Mask = 0x1; affinity_new.Mask = 0x1;
......
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