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: Andi Kleen <andi at firstfloor dot org>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: Andi Kleen <andi at firstfloor dot org>, libc-alpha at sourceware dot org, Andi Kleen <ak at linux dot intel dot com>
- Date: Thu, 16 May 2013 02:08:27 +0200
- 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>
> > +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
-Andi