monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] what exactly is tests/spawn_redirected_hook_helper


From: Timothy Brownawell
Subject: Re: [Monotone-devel] what exactly is tests/spawn_redirected_hook_helper testing?
Date: Fri, 08 May 2009 21:25:11 -0500

On Fri, 2009-05-08 at 08:56 -0700, Zack Weinberg wrote:
> On Fri, May 8, 2009 at 5:23 AM, Timothy Brownawell <address@hidden> wrote:
> > On Sun, 2009-04-05 at 17:46 -0700, Zack Weinberg wrote:
> >> The 0.43 package for Debian is failing to build on several of their
> >> architectures because tests/spawn_redirected_hook_helper is unreliable
> >> on a heavily loaded machine; there's a race where one of the processes
> >> created by the test can hang around and create a file just when the
> >> test runner is trying to blow away the test directory, causing that to
> >> fail.  I'm pretty clear on how the race happens, but I'm not sure what
> >> the test is actually *testing*, so it's not clear how to fix it.
> >> Anyone know?
> >
> > ...how does it happen? The only thing that I'd think would be specific
> > to that test is the "cp" that's spawned in the hook, but it waits for
> > that on line 18 so it should be gone when the test ends (plus the last
> > "check" would fail if that was the problem, which should make it *not*
> > blow away the directory for that test).
> 
> I added both the wait on line 18 of the hook and the "check" line that
> I think you're referring to, in revision
> ca9e27455b19faae0b4381613a18dec47a46b1de.  This does seem to have
> eliminated the race condition, but may well have made the test no
> longer test anything meaningful...

Oh, hmm. Well, I think that actually helps a bit since now it makes sure
that the output file really was created in addition to checking that the
command got executed.

But now that I think about it, that test really says nothing useful and
would only have been meaningful in the old GNU Autotest testsuite. It's
meant to check that the spawn_redirected() call works properly, but that
call is used internally in the tester for pretty much every command it
executes. If it did break, probably every single test would fail.

-- 
Timothy

Free public monotone hosting: http://mtn-host.prjek.net
If monotone breaks network compatibility you'll see it here
first (probably even before the new version shows up in your
distro's repositories).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]