[darcs-devel] zooko's idea of why buildbot run tests fail when manual ones don't

Mark Stosberg mark at stosberg.com
Sat Mar 8 21:12:00 UTC 2008


> We know what happens when a process is spawned and run -- the only
> remaining uncertainty is what the buildbot does with the stderr,
> stdout, and stdin pipes of the child process.  Here is the relevant
> source code:
>
> http://buildbot.net/trac/browser/buildbot/slave/commands.py?rev=491#L311
>
> The call to "spawnProcess" is where Buildbot hands off the job of
> spawning a subprocess to the Twisted library.  I see just before that
> it says
>
>         if not self.keepStdinOpen:
>              self.pp.closeStdin()
>
> I see from the script quoted above in this Mark Stosberg's message
> that the name of the class created is "Test", respectively.  Let's
> look at that class:
>
> http://buildbot.net/trac/browser/buildbot/steps/shell.py?rev=491#L280
>
> It does not set the "keepStdinOpen" member variable, so it must still
> be set to the default setting.  A bit of Grep Oriented Programming
> tells me that the default value is false, and I think that it can be
> set by passing a keyword 'keep_stdin_open', like this:
>
> f1.addStep(step.Test, timeout=3600, command=['bash','-c','make
> test'] , keep_stdin_open=True)
>
> So, my current hypothesis is that closing stdin changes the behavior
> of the perl tests.  I don't think there is anything else that differs
> between the buildslave's invocation of 'make test' and a local
> invocation of 'make test' from a bash shell.

Zooko,

This sounds like a great analysis. It would be consistent with why the
change to the steve_and_monica script help...I think it was the first
script executed that piped data so that darcs expected on STDIN.

The Perl tests would be using STDIN in two ways. First, some of them
pipe data into darcs like steve_and_monica did. The harness itself may
also use STDIN as part of the infrastructure.

I have now made the changes you suggested in the buildbot config files
and restarted buildbot. So when the next patch is applied, we can test 
out your suggested change.

     Mark

-- 
http://mark.stosberg.com/




More information about the darcs-devel mailing list