On Sun, Jul 27, 2008 at 10:40 PM, Eric Wilhelm
<[EMAIL PROTECTED]> wrote:
> # from James Keenan via RT
> # on Sunday 27 July 2008 18:45:
>
>>> It appears that this test assumes (multiple times perhaps?) that it
>>> may make named files in /tmp/.
>>
>>Are you saying that making named files in /tmp (or any other temporary
>>directory) is bad or something to be avoided?  If so, what
>> alternatives should we pursue?
>
> Yes.  At least, things like '/tmp/file' and '/tmp/dir' are asking for
> trouble.  By "named files", I mean "simplistically named".
>
> Firstly, as a matter of good practice:  a simple name (especially short
> things like 't') could conflict with a file or directory name which is
> likely something I'm using (i.e. if I had a directory /tmp/t/, then the
> test would have passed, but silently deleted some files I was working
> with and made me sad - or at least extremely puzzled!)
>
> Secondly, for parallelization: you could conflict with another of your
> own test scripts and then everyone gets confused and puzzled.
>
> Suggested alternative:  create one directory such as "/tmp/parrot.7947"
> (using process id or a more sophisticated algorithm if available), then
> create whatever you want inside that -- "/tmp/parrot.7947/t" is fine.
>
> Thanks,
> Eric
> --
> We who cut mere stones must always be envisioning cathedrals.
> --Quarry worker's creed
> ---------------------------------------------------
>    http://scratchcomputing.com
> ---------------------------------------------------
>

I presume Eric noticed this as he was working on his patch to enable a
parallel make test; Now that his patch is applied, fixing these tests
should have a higher priority; If two tests that are trying to
create/use the same directory run at the same time, one of them is
likely to fail.

-- 
Will "Coke" Coleda

Reply via email to