This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 7/9] Extend the test suite for TSX and add some new tests to test elision
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: libc-alpha at sourceware dot org, Andi Kleen <ak at linux dot intel dot com>
- Date: Wed, 15 May 2013 21:12:00 -0400
- Subject: Re: [PATCH 7/9] Extend the test suite for TSX and add some new tests to test elision
- References: <1368225725-14283-1-git-send-email-andi at firstfloor dot org> <1368225725-14283-8-git-send-email-andi at firstfloor dot org> <5191F578 dot 3010501 at redhat dot com> <20130516000827 dot GH17814 at two dot firstfloor dot org>
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.