On Mon, Aug 18, 2014 at 5:02 PM, Stefan Hajnoczi <stefa...@redhat.com> wrote: > On Fri, Aug 15, 2014 at 05:55:49PM +0400, Maria Kustova wrote: >> Signed-off-by: Maria Kustova <mari...@catit.be> >> --- >> tests/image-fuzzer/runner.py | 29 +++++++++++++++++++++++++---- >> 1 file changed, 25 insertions(+), 4 deletions(-) >> >> diff --git a/tests/image-fuzzer/runner.py b/tests/image-fuzzer/runner.py >> index 688d470..4399529 100755 >> --- a/tests/image-fuzzer/runner.py >> +++ b/tests/image-fuzzer/runner.py >> @@ -65,14 +65,35 @@ def run_app(fd, q_args): >> """Start an application with specified arguments and return its exit >> code >> or kill signal depending on the result of execution. >> """ >> + >> + class Alarm(Exception): >> + """Exception for signal.alarm events.""" >> + pass >> + >> + def handler(*arg): >> + """Notify that an alarm event occurred.""" >> + raise Alarm >> + >> + signal.signal(signal.SIGALRM, handler) >> + signal.alarm(300) > > What is the purpose of this patch? > > The hardcoded 5-minute timeout suggests you're trying to catch runaway > processes. So this has nothing to do with the new --duration option?
Yes, this patch doesn't relate to the implementation of the '--duration' option. It helps to mark hung tests as failed. Maria