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?

Stefan

Attachment: pgpoc48keKYFi.pgp
Description: PGP signature

Reply via email to