[PATCH] ntdll/tests: Add basic tests for NtSetInformationThread(), class ThreadAffinityMask

Roger Zoellner zoellner.roger at gmail.com
Sun Sep 9 14:27:01 CDT 2018


Thank you for the suggestions. I will look into it.
However, I'm wondering why the test fails on that two 32bit systems...

Am So., 9. Sep. 2018 um 21:10 Uhr schrieb Chris Robinson <
chris.kcat at gmail.com>:

> On 09/09/2018 11:16 AM, Roger Zoellner wrote:
> > +static DWORD WINAPI thread_main(LPVOID lpParam)
> > +{
> > +    /* Thread is created with CREATE_SUSPENDED flag set and isn't doing
> anything */
> > +}
>
> You should still probably do
>
> (void)lpParam;
> return 0;
>
> to avoid compiler warnings about unused parameters and lacking a return
> value.
>
> > +    /* Test required affinity mask, all bits set */
> > +    req_aff = ~0u;
>
> This isn't all bits set for 64-bit targets. Try
>
> req_aff = ~(ULONG_PTR)0;
>
> for that.
>
> > +    status = pNtSetInformationThread(thread, class, &req_aff,
> req_aff_length);
> > +    ok(status == STATUS_SUCCESS, "NtSetInformationThread failed.
> Expected STATUS_SUCCESS, got %08x (class=ThreadAffinityMask, case 2,
> req_aff=%08x, process_aff=%08x)\n", status, req_aff, process_aff);
> > ...
> > +    /* Test required affinity mask = process affinity mask with a
> prepended bit set */
> > +    req_aff = (process_aff << 1) | process_aff;
> > +    status = pNtSetInformationThread(thread, class, &req_aff,
> req_aff_length);
> > +    ok(status == STATUS_SUCCESS, "NtSetInformationThread failed.
> Expected STATUS_SUCCESS, got %08x (class=ThreadAffinityMask, case 4,
> req_aff=%08x, process_aff=%08x)\n", status, req_aff, process_aff);
>
> Might it be worth checking to see what's returned from
> NtQueryInformationThread after trying to set extraneous mask bits?
>
> Also, the tests that currently fail under Wine should be marked with
> todo_wine until a proper fix is made, and such a fix would remove the
> rodo_wines (unless the tests are part of a series that come after the fix).
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20180909/96236a47/attachment.html>


More information about the wine-devel mailing list