qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Maria Kustova <maxa@catit.be>
Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org,
	Maria Kustova <maria.k@catit.be>
Subject: Re: [Qemu-devel] [PATCH 2/2] runner: Kill a program under test by time-out
Date: Mon, 18 Aug 2014 14:02:45 +0100	[thread overview]
Message-ID: <20140818130245.GA1273@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <a1a10fd8c88669993e34bd9dfd2e13f8340851ac.1408109650.git.maria.k@catit.be>

[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]

On Fri, Aug 15, 2014 at 05:55:49PM +0400, Maria Kustova wrote:
> Signed-off-by: Maria Kustova <maria.k@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 #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-08-18 13:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15 13:55 [Qemu-devel] [PATCH 0/2] runner: Control test duration Maria Kustova
2014-08-15 13:55 ` [Qemu-devel] [PATCH 1/2] runner: Add an argument for " Maria Kustova
2014-08-18  5:30   ` Fam Zheng
2014-08-15 13:55 ` [Qemu-devel] [PATCH 2/2] runner: Kill a program under test by time-out Maria Kustova
2014-08-18 13:02   ` Stefan Hajnoczi [this message]
2014-08-18 14:42     ` M.Kustova

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140818130245.GA1273@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=maria.k@catit.be \
    --cc=maxa@catit.be \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).