From patchwork Fri Oct 15 20:52:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 257771 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9FKqnks021028 for ; Fri, 15 Oct 2010 20:52:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932498Ab0JOUws (ORCPT ); Fri, 15 Oct 2010 16:52:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58076 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932269Ab0JOUwr (ORCPT ); Fri, 15 Oct 2010 16:52:47 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9FKqkB0002358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 15 Oct 2010 16:52:46 -0400 Received: from localhost (ovpn-113-101.phx2.redhat.com [10.3.113.101]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9FKqjdA030827; Fri, 15 Oct 2010 16:52:46 -0400 From: Luiz Capitulino To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, lmr@redhat.com Subject: [PATCH 1/3] QMPMonitor: Introduce the get_greeting() method Date: Fri, 15 Oct 2010 17:52:32 -0300 Message-Id: <1287175954-19465-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1287175954-19465-1-git-send-email-lcapitulino@redhat.com> References: <1287175954-19465-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 15 Oct 2010 20:52:50 +0000 (UTC) diff --git a/client/tests/kvm/kvm_monitor.py b/client/tests/kvm/kvm_monitor.py index 6bff07f..d77af31 100644 --- a/client/tests/kvm/kvm_monitor.py +++ b/client/tests/kvm/kvm_monitor.py @@ -408,7 +408,7 @@ class QMPMonitor(Monitor): while time.time() < end_time: for obj in self._read_objects(): if "QMP" in obj: - self._greeting = obj["QMP"] + self._greeting = obj break if self._greeting: break @@ -597,6 +597,13 @@ class QMPMonitor(Monitor): self._lock.release() + def get_greeting(self): + """ + Return QMP greeting message. + """ + return self._greeting + + # Command wrappers # Note: all of the following functions raise exceptions in a similar manner # to cmd() and _get_command_output().