This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Testsuite races
On 8/15/2012 2:29 PM, Jeff Law wrote:
> On 08/14/2012 03:05 PM, Roland McGrath wrote:
>> I'd like to see an enumeration of all the sets of mutually-interfering
>> tests and for each a mention of what files are doubly-touched, before we
>> settle on a solution.
>>
>> My tendency is toward something that is between #2 and #3.
>> That is, break out common setup tasks into a shared target that
>> is a dependency of both test rules.
>>
>> But I'd like to see all the cases first.
> It looks like it's just tst-codeset, tst-gettext3 and tst-gettext5 which conflict on ${objpfx}domaindir/de_DE/LC_MESSAGES/codeset.mo
>
> Changing the .sh file to look like:
>
> (
> flock 200
> [ generate data & run test ]
> ) 200>${objpfx}lockfile
>
> In each of the three tests seems to do the trick. Similarly creating a dependency in the Makefile where tst-gettext3.out depends on tst-codeset.out and tst-gettext5.out depends on tst-gettext3.out works just as well.
My personal opinion is that this should be encoded as a
dependency in the Makefile.
It feels a bit like a bike-shed, but I'm always happier
when the higher level framework is *aware* of the
dependency and schedules accordingly, instead of
pushing the complexity down a level.
I lean hard for #3.
Cheers,
Carlos.
--
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell@mentor.com
carlos@codesourcery.com
+1 (613) 963 1026