From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Meneghel Rodrigues Subject: Re: [PATCH] kvm_monitor.py: is_responsive(): Use status command Date: Fri, 08 Oct 2010 09:19:11 -0300 Message-ID: <1286540351.2377.62.camel@freedom> References: <20101007193057.05266ab3@doriath> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: autotest@test.kernel.org, ehabkost@redhat.com, kvm@vger.kernel.org To: Luiz Capitulino Return-path: In-Reply-To: <20101007193057.05266ab3@doriath> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org 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 > --- > 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