[PATCH 4/4] ucrtbase: Add tests for _beginthread[ex]().

Arkadiusz Hiler ahiler at codeweavers.com
Mon May 3 11:37:38 CDT 2021


On Mon, May 03, 2021 at 06:06:35PM +0200, Piotr Caban wrote:
> On 5/3/21 3:07 PM, Arkadiusz Hiler wrote:
> > +static void test_thread_library_reference(char *thread_dll,
> > +                                          enum beginthread_method beginthread_method,
> > +                                          enum thread_exit_method exit_method)
> ...
> > +    if (exit_method != thread_exit_endthread)
> > +        CloseHandle((HANDLE)thread_handle);
> Shouldn't the CloseHandle be called depending on what function was called to
> create the thread?

Whoops, that's a leftover from when I thought that it depends purely on
_endthread variant used.

> > +static unsigned internal_thread_proc(void *param)
> > +{
> > +    struct threaddll_args *args = param;
> > +    SetEvent(args->confirm_running);
> > +    WaitForSingleObject(args->past_free, 100);
> It doesn't matter that much in this case but please test WaitForSingleObject
> return value. It can still give some hints if tests start to fail.

Any standard way to do that from DLLs? The current winetest_*()
implementation is not really meant for this use case, as it defines all
the function in testlist.c (#define STANDALONE) + adds a main() and
requires winetest_testlist.

Thanks for the review :-)

-- 
Cheers,
Arek



More information about the wine-devel mailing list