All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH 3/3] add timeout support
Date: Mon, 21 Dec 2015 18:04:20 +0100	[thread overview]
Message-ID: <20151221170419.GA12725@potion.redhat.com> (raw)
In-Reply-To: <1450383054-9724-4-git-send-email-drjones@redhat.com>

2015-12-17 14:10-0600, Andrew Jones:
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
> diff --git a/arm/run b/arm/run
> @@ -75,10 +75,14 @@ chr_testdev+=' -device virtconsole,chardev=ctd -chardev testdev,id=ctd'
>  M+=",accel=$ACCEL"
>  command="$qemu $M -cpu $processor $chr_testdev"
>  command+=" -display none -serial stdio -kernel"
> -echo $command "$@"
> +
> +if [ "$TIMEOUT" ]; then
> +	timeout_cmd="timeout --foreground $TIMEOUT"

(command="timeout --foreground $TIMEOUT $command" # to keep the clutter
 down.)

> +fi

(We paste it three times, so I'd rather see this abstracted in a
 "scripts/" library.)

> diff --git a/run_tests.sh b/run_tests.sh
> @@ -21,6 +21,7 @@ function run()
> +    local timeout="${9:-$TIMEOUT}"
> diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh
> @@ -97,8 +98,12 @@ if [ "\$QEMU" ]; then
> +if [ "$timeout" ]; then
> +	timeout_cmd='timeout --foreground $timeout'

Both would be nicer if they took the TIMEOUT variable as an override.
We already don't do that for accel and the patch seems ok in other
regards,

Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>

  reply	other threads:[~2015-12-21 17:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-17 20:10 [kvm-unit-tests PATCH 0/3] run_tests.sh changes Andrew Jones
2015-12-17 20:10 ` [kvm-unit-tests PATCH 1/3] run_tests.sh: reduce return code ambiguity Andrew Jones
2015-12-21 16:31   ` Radim Krčmář
2015-12-21 19:35     ` Andrew Jones
2015-12-22 17:29       ` Radim Krčmář
2015-12-17 20:10 ` [kvm-unit-tests PATCH 2/3] cleanup unittests.cfg headers Andrew Jones
2015-12-17 20:10 ` [kvm-unit-tests PATCH 3/3] add timeout support Andrew Jones
2015-12-21 17:04   ` Radim Krčmář [this message]
2015-12-21 19:45     ` Andrew Jones
2015-12-22 18:02       ` Radim Krčmář
2015-12-22 19:51         ` Andrew Jones

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=20151221170419.GA12725@potion.redhat.com \
    --to=rkrcmar@redhat.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.