From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: autotest@test.kernel.org, ehabkost@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH] kvm_monitor.py: is_responsive(): Use status command
Date: Fri, 08 Oct 2010 09:19:11 -0300 [thread overview]
Message-ID: <1286540351.2377.62.camel@freedom> (raw)
In-Reply-To: <20101007193057.05266ab3@doriath>
On Thu, 2010-10-07 at 19:30 -0300, Luiz Capitulino wrote:
> The is_responsive() method in QMPMonitor class uses the query-version
> command to check if the monitor is alive and the same method in the
> HumanMonitor class uses the help command.
>
> This commit changes both classes to use the status command instead,
> so that:
>
> o The QEMU's response is shorter when using the Human Monitor. The
> help command output is 70 lines long, which makes it a bit
> expansive for a single ping
>
> o is_responsive() can be extended to check if QEMU is running
>
> o My logs won't be flooded with help's output :-)
This looks good to me, applied:
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
> client/tests/kvm/kvm_monitor.py | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/client/tests/kvm/kvm_monitor.py b/client/tests/kvm/kvm_monitor.py
> index 9a66388..8c92413 100644
> --- a/client/tests/kvm/kvm_monitor.py
> +++ b/client/tests/kvm/kvm_monitor.py
> @@ -243,7 +243,7 @@ class HumanMonitor(Monitor):
> @return: True if responsive, False otherwise
> """
> try:
> - self._get_command_output("help")
> + self._get_command_output("info status")
> return True
> except MonitorError:
> return False
> @@ -548,7 +548,7 @@ class QMPMonitor(Monitor):
> @return: True if responsive, False otherwise
> """
> try:
> - self._get_command_output("query-version")
> + self._get_command_output("query-status")
> return True
> except MonitorError:
> return False
prev parent reply other threads:[~2010-10-08 12:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-07 22:30 [PATCH] kvm_monitor.py: is_responsive(): Use status command Luiz Capitulino
2010-10-08 12:19 ` Lucas Meneghel Rodrigues [this message]
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=1286540351.2377.62.camel@freedom \
--to=lmr@redhat.com \
--cc=autotest@test.kernel.org \
--cc=ehabkost@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lcapitulino@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox