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 */
affinity_new.Group = 0; if (sysInfo.dwNumberOfProcessors < 8 * sizeof(DWORD_PTR))
affinity_new.Mask = ~0u; {
SetLastError(0xdeadbeef); affinity_new.Group = 0;
ok(!pSetThreadGroupAffinity(curthread, &affinity_new, NULL), "SetThreadGroupAffinity succeeded\n"); affinity_new.Mask = ~(DWORD_PTR)0;
ok(GetLastError() == ERROR_INVALID_PARAMETER, SetLastError(0xdeadbeef);
"Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); ok(!pSetThreadGroupAffinity(curthread, &affinity_new, NULL), "SetThreadGroupAffinity succeeded\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"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