This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 7/9] Extend the test suite for TSX and add some new tests to test elision


On 05/15/2013 08:08 PM, Andi Kleen wrote:
>>> +main (void)
>>> +{
>>> +  if (mtx_timed_elision.__data.__kind !=
>>> +      (PTHREAD_MUTEX_TIMED_NP|PTHREAD_MUTEX_ELISION_NP))
>>> +    return 1;
>>> +  if (mtx_timed_no_elision.__data.__kind !=
>>> +      (PTHREAD_MUTEX_TIMED_NP|PTHREAD_MUTEX_NO_ELISION_NP))
>>> +    return 2;
>>> +  if (mtx_adaptive_elision.__data.__kind !=
>>> +      (PTHREAD_MUTEX_ADAPTIVE_NP|PTHREAD_MUTEX_ELISION_NP))
>>> +    return 3;
>>> +  if (mtx_adaptive_no_elision.__data.__kind !=
>>> +      (PTHREAD_MUTEX_ADAPTIVE_NP|PTHREAD_MUTEX_NO_ELISION_NP))
>>> +    return 4;
>>> +  return 0;
>>> +}
>>
>> Use test-skeleton.c please. All tests need to be able to abort
>> or timeout.
> 
> This was copied from initializers1. Also I tried to use the skeleton,
> but it doesn't work because not all files used by the skeleton
> are compatible with all the gcc options initializers* is compiled
> with. So I went back to just use main
> 
> gcc tst-initializers2.c -c -std=gnu99 -fgnu89-inline ...
> 
> 
> In file included from ../malloc/malloc.h:24:0,
>                  from ../include/malloc.h:2,
>                  from ../test-skeleton.c:22,
>                  from tst-initializers2.c:54:
> ../include/stdio.h:111:15: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â__getwc_unlockedâ
> cc1: warnings being treated as errors

That's a good reason *not* to use test-skeleton.c.

I've added this to the master todo list to fix.

Please feel free to keep using just a bare main.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]