public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: autotest@test.kernel.org
Cc: kvm@vger.kernel.org, lmr@redhat.com, ehabkost@redhat.com
Subject: [PATCH] kvm_monitor.py: is_responsive(): Use status command
Date: Thu, 7 Oct 2010 19:30:57 -0300	[thread overview]
Message-ID: <20101007193057.05266ab3@doriath> (raw)

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 :-)

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
-- 
1.7.3.1.104.gc752e


             reply	other threads:[~2010-10-07 22:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 22:30 Luiz Capitulino [this message]
2010-10-08 12:19 ` [PATCH] kvm_monitor.py: is_responsive(): Use status command Lucas Meneghel Rodrigues

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=20101007193057.05266ab3@doriath \
    --to=lcapitulino@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=ehabkost@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=lmr@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