Commit c2a2687d authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

ntdll/tests: Don't fail if a process is not available.

parent 766530df
......@@ -729,7 +729,15 @@ static void test_query_process_handlecount(void)
ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status);
process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, one_before_last_pid);
trace("Handlecount for process with ID : %ld\n", one_before_last_pid);
if (!process)
{
trace("Could not open process with ID : %ld, error : %08lx. Going to use current one.\n", one_before_last_pid, GetLastError());
process = GetCurrentProcess();
trace("ProcessHandleCount for current process\n");
}
else
trace("ProcessHandleCount for process with ID : %ld\n", one_before_last_pid);
status = pNtQueryInformationProcess( process, ProcessHandleCount, &handlecount, sizeof(handlecount), &ReturnLength);
ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status);
ok( sizeof(handlecount) == ReturnLength, "Inconsistent length (%d) <-> (%ld)\n", sizeof(handlecount), ReturnLength);
......
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