Paul Gofman pgofman@codeweavers.com writes:
+static void test_query_cpusetinfo(void) +{
- SYSTEM_CPU_SET_INFORMATION *info;
- unsigned int i, cpu_count;
- ULONG len, expected_len;
- NTSTATUS status;
- SYSTEM_INFO si;
- HANDLE process;
- if (!pNtQuerySystemInformationEx)
return;
- GetSystemInfo(&si);
- cpu_count = si.dwNumberOfProcessors;
- expected_len = cpu_count * sizeof(*info);
- process = GetCurrentProcess();
- status = pNtQuerySystemInformationEx(SystemCpuSetInformation, &process, sizeof(process), NULL, 0, &len);
- if (status == STATUS_INVALID_INFO_CLASS)
- {
win_skip("SystemCpuSetInformation is not supported\n");
return;
- }
- ok(status == STATUS_BUFFER_TOO_SMALL, "Got unexpected status %#x.\n", status);
- ok(len == expected_len, "Got unexpected length %u.\n", len);
- len = 0xdeadbeef;
- status = pNtQuerySystemInformation(SystemCpuSetInformation, NULL, 0, &len);
- todo_wine_if(!is_win64 && status == STATUS_INVALID_PARAMETER)
- ok(status == (is_win64 ? STATUS_INVALID_PARAMETER : STATUS_INVALID_INFO_CLASS),
"Got unexpected status %#x.\n", status);
- ok(len == 0xdeadbeef, "Got unexpected len %u.\n", len);
You should avoid is_win64 checks in the tests as well. Simply allow both values, or allow just one and mark the other broken.