[PATCH 1/2 v4] ntdll/tests: Check debug registers of a newly created thread
Dmitry Timoshkov
dmitry at baikal.ru
Fri Apr 7 21:33:21 CDT 2017
Hi Christian,
Christian Inci <chris.wine at broke-the-inter.net> wrote:
> + thread = CreateThread(NULL, 0, dummy_thread, NULL, CREATE_SUSPENDED, NULL);
> + ok(thread != INVALID_HANDLE_VALUE, "CreateThread failed with %d\n", GetLastError());
> + memset(&ctx, 0, sizeof(ctx));
> + ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
> + status = pNtGetContextThread(thread, &ctx);
> + ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", status);
> + ok(!ctx.Dr0, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr0);
> + ok(!ctx.Dr1, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr1);
> + ok(!ctx.Dr2, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr2);
> + ok(!ctx.Dr3, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr3);
> + todo_wine ok(!ctx.Dr6, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr6);
> + todo_wine ok(!ctx.Dr7, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr7);
> + CloseHandle(thread);
> +}
The thread needs to be explicitly terminated.
--
Dmitry.
More information about the wine-devel
mailing list