[darcs-users] darcs patch: Help the test harness clean to up after ... (and 1 more)
kowey at darcs.net
Thu Oct 9 10:05:27 UTC 2008
On Thu, Oct 09, 2008 at 05:54:41 -0400, David Roundy wrote:
> > If tests are run in parallel, each instance of the diff test may
> > attempt to create temporary directories for use by darcs diff.
> > Darcs itself handles this fine; only the test script gets confused
> > by the spurious difference that results.
> This sounds to me like a workaround for a bug in darcs. Do you really
> think it's appropriate to give spurious results?
As we know, darcs diff generates temporary directories repobasename-old
The diff test works by running darcs diff two ways and comparing the
outputs to make sure they are the same. It does this because it wants
to make sure that two different ways of calling darcs diff give the same
result. This relies on an implicit (unreasonable) assumption that the
temporary directories created by darcs will have the same names between
the two diffs. This assumption breaks down if you run the diff test in
parallel, which darcs check is liable to do.
It seems that darcs itself is doing the right thing here; it avoids
clobbering pre-existing temporary files by giving new names. If you
simultaneously run darcs diff on repositories /a/foo and /b/foo, darcs
has no choice but to call them different things
vs /tmp/foo-old-1 /tmp/foo-new-1
So darcs itself seems to be doing the right thing. The test is just
making a silly assumption. With my patch, the test continues to make
the same assumption, but at least the repository basename is armoured
against accidental similarity.
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 194 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20081009/2b53b0bb/attachment.pgp
More information about the darcs-users