[cvs] bogofilter/tests t.frame,1.24,1.25

David Relson relson at osagesoftware.com
Tue Jan 21 01:53:53 CET 2003


At 07:21 PM 1/20/03, Matthias Andree wrote:

>There's nothing wrong in killing the directory, but we cannot do that
>before we know we're the ONLY process to use it. We must be sure no
>other process is using it at the same time, and bumping mkdir into an
>existing directory is the safe way to figure.
>
>The rm -rf $TMPDIR ; mkdir $TMPDIR stuff is after the "while" loop -- at
>that time, we know that we're the only user of $TMPDIR -- for the other
>user, mkdir $TMPDIR would've failed. OTOH, rm -rf $TMPDIR/* is both
>incomplete and dangerous. '*' might be a symlink...
>
>There is a small window for collision, but if it strikes, the mkdir
>after the rm -rf is going to fail, so it will be caught and not confuse
>the test. Do you think we should fix this?

I don't think it needs to be fixed.  Seems like the testing will only have 
trouble if two sets of tests are running simultaneously.  I don't do 
that.  Do you?  Do we really need to spend time making it possible?  I 
don't have the urge.  Do you?





More information about the bogofilter-dev mailing list