[MERGE][bug #102019] strace hanging the test suite

Martin Pool mbp at sourcefrog.net
Tue Jul 3 08:32:57 BST 2007


On 7/3/07, Robert Collins <robertc at robertcollins.net> wrote:
> On Mon, 2007-07-02 at 13:22 +0200, Vincent Ladeuil wrote:
> > Hi,
> >
> > The attached patch was obtained from playing with sigstop-demo.py
> > script in
> > https://bugs.launchpad.net/ubuntu/+source/strace/+bug/103133.
> >
> > This script has the nice property that it hangs at every run :)
> >
> > Disabling the '-f' strace option make it run without hanging.
> >
> > From strace man page :
> >
> >        -f          Trace child processes as they are  created  by  cur‐
> >                    rently  traced  processes as a result of the fork(2)
> >                    system call.
> >
> > This is not needed during the tests, so far, so I disabled the
> > option for them.
>
> I would prefer it if you had a new function.
>
> e.g.
> def strace_detailed(function, args, kwargs, follow_children=True):
>     ...
>
> and strace becomes
> def strace(function, *args, **kwargs):
>     return strace_detailed(function, args, kwargs)
>
> and the tests that test executing strace can do
> strace_detailed calls rather than strace calls.

I agree with Robert that this style is nicer.  I know there are cases
in the test suite where we mix them together and that's why I have
this opinion.

However, it seems to me that using strace -f on bzr is likely to cause
hangs in regular operation just as in the test suite.  Therefore I
don't see it as urgent to support it until it actually works properly.

-- 
Martin



More information about the bazaar mailing list