[PATCH v8 7/8] nptl: Add test cases for ISO C11 threads

Adhemerval Zanella adhemerval.zanella@linaro.org
Tue Jul 17 13:53:00 GMT 2018



On 13/07/2018 10:29, Adhemerval Zanella wrote:
> 
> 
> On 13/07/2018 10:11, Florian Weimer wrote:
>> On 07/13/2018 03:10 PM, Adhemerval Zanella wrote:
>>>
>>>
>>> On 13/07/2018 06:31, Florian Weimer wrote:
>>>> On 02/02/2018 06:04 PM, Adhemerval Zanella wrote:
>>>>> This patch adds to testsuite new test cases to test all new introduced
>>>>> C11 threads functions, types and macros are tested.
>>>>
>>>> Somewhere, there should be a test that the types (thrd_t, once_flag, mtx_t, cnd_t) have identicial size and alignment as the POSIX types, and that TSS_DTOR_ITERATIONS equals PTHREAD_DESTRUCTOR_ITERATIONS.
>>>>
>>>> It should probably be a separate test, to avoid including <pthread.h> in the <threads.h> tests.
>>>
>>> Right, I will work on a extra test for this.
>>
>> I've since realized that these asserts are in the implementation, which is a bit questionable, but better than nothing.  I guess you can add the assert for TSS_DTOR_ITERATIONS into the implementation itself.
> 
> The asserts are more for implementation consistency, if we eventually
> change internal implementation so POSIX and C11 either shared a common
> or distinct implementation we can change the test to check for ABI
> expected values instead.
> 
> Ok, I also think an assert TSS_DTOR_ITERATIONS should simplify things.
> 

I added a static assert to check TSS_DTOR_ITERATIONS is equal to 
PTHREAD_DESTRUCTOR_ITERATIONS.



More information about the Libc-alpha mailing list