[BUG] test_cat fails to detect

Martin Pool mbp at sourcefrog.net
Mon Apr 23 01:49:22 BST 2007


On 4/20/07, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Submitting to PQM, test_cat broke for me, for no apparent reason.  It
> may be some kind of timing bug in the dirstate code, because it failed
> to detect the changes that this test case makes.
>
> Of course, I was able to merge and resubmit the change later, and it was
> accepted then.

I think your message was truncated at some point, so I couldn't see
the precise failure.  I'm assuming it was TestCat.test_cat...

There's nothing explicitly timing-dependent in that test -- it's not
one of the ones that's asserting something takes less than x seconds.
So if there is a timing bug in dirstate that would be worrying and
ought to be fixed.  Did you get a proper traceback?

dirstate ought to be using the same rule as hashcache that
recently-changed files cannot be cached...

I can see one possibility other than a dirstate bug, which is

          open('a', 'wb').write('foo\n')

That's not being flushed, and it might be possible that it does not
get gc'd, flushed and closed before the test finishes.

This test is an old one where it always runs bzr in a subprocess,
rather than in memory as we usually do.  But that might catch some
edge cases I suppose.

(Maybe pqm should run without --verbose so we can more easily see what
*did* fail?)

-- 
Martin



More information about the bazaar mailing list