[PATCH 1/2 v4] ntdll/tests: Check debug registers of a newly created thread

Christian Inci chris.wine at broke-the-inter.net
Sat Apr 8 08:15:52 CDT 2017


Thank you very much. Fixed in v5.

On 04/08/2017 04:33 AM, Dmitry Timoshkov wrote:
> 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.
> 



More information about the wine-devel mailing list