[RFC][BUG #226769] strace test side-effect hangs selftest

Andrew Bennetts andrew at canonical.com
Mon May 5 08:31:07 BST 2008


Vincent Ladeuil wrote:
> While submitting a merge request to pqm, selftest hanged.
[...]
> 
> 3) Implement a protection mechanism in selftest as proposed in
>    https://bugs.launchpad.net/bzr/+bug/69978/comments/2

I think a better place to put a watchdog mechanism is in the “make check” rule
that PQM runs, rather than selftest itself.  This avoids adding more
signal/thread interactions (which are part of the problem here!).  Also, for
interactive use we don't really need this (a human can always hit Ctrl-C), the
main thing we want to avoid is blocking PQM.

One option for doing this in “make check” would be a simple python wrapper
script that uses the subprocess module to watch for output.  If there's no
output on stdout for, say, 120s, we can assume that the tests have hung (or are
appallingly slow), and abort the test run by killing the test process (and
ideally the rest of the process group).

Ideally this feature would be builtin to PQM, I'm sure we aren't the first or
last project that would find this feature useful...

-Andrew.




More information about the bazaar mailing list