From: Michael Goldish <mgoldish@redhat.com>
To: qzhou@redhat.com
Cc: autotest@test.kernel.org, kvm@vger.kernel.org, lcapitulino@redhat.com
Subject: Re: [PATCH 1/2 RESEND] KVM Test: Introduce qmp_monitor property in 'kvm_vm.VM'
Date: Mon, 10 Jan 2011 19:52:53 +0200 [thread overview]
Message-ID: <4D2B4775.90003@redhat.com> (raw)
In-Reply-To: <1294656428-1959-1-git-send-email-qzhou@redhat.com>
On 01/10/2011 12:47 PM, qzhou@redhat.com wrote:
> From: Qingtang Zhou<qzhou@redhat.com>
>
> Introduce qmp_monitor property can help us easily get a qmp monitor
> of guest.
>
> CC to Luiz and kvm@vger.kernel.org
>
> Signed-off-by: Qingtang Zhou<qzhou@redhat.com>
The monitor property returns the main monitor. Isn't it fair to assume
that qmp_basic is always run with main_monitor set to a qmp monitor?
> ---
> client/tests/kvm/kvm_vm.py | 10 ++++++++++
> client/tests/kvm/tests/qmp_basic.py | 15 +++++++++------
> 2 files changed, 19 insertions(+), 6 deletions(-)
>
> diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
> index f6f1684..0ba2db4 100755
> --- a/client/tests/kvm/kvm_vm.py
> +++ b/client/tests/kvm/kvm_vm.py
> @@ -870,6 +870,16 @@ class VM:
> if self.monitors and not self.params.get("main_monitor"):
> return self.monitors[0]
>
> + @property
> + def qmp_monitor(self):
> + """
> + Return the first QMP monitor.
> + If no QMP monitor exist, return None.
> + """
> + for m in self.monitors:
> + if isinstance(m, kvm_monitor.QMPMonitor):
> + return m
> + return None
>
> def is_alive(self):
> """
> diff --git a/client/tests/kvm/tests/qmp_basic.py b/client/tests/kvm/tests/qmp_basic.py
> index 985ad15..36cbd78 100644
> --- a/client/tests/kvm/tests/qmp_basic.py
> +++ b/client/tests/kvm/tests/qmp_basic.py
> @@ -383,13 +383,16 @@ def run_qmp_basic(test, params, env):
>
> vm = kvm_test_utils.get_living_vm(env, params.get("main_vm"))
>
> + if vm.qmp_monitor is None:
> + raise error.TestError("Could not find a QMP monitor, abort test.")
> +
> # Run all suites
> - greeting_suite(vm.monitor)
> - input_object_suite(vm.monitor)
> - argument_checker_suite(vm.monitor)
> - unknown_commands_suite(vm.monitor)
> - json_parsing_errors_suite(vm.monitor)
> + greeting_suite(vm.qmp_monitor)
> + input_object_suite(vm.qmp_monitor)
> + argument_checker_suite(vm.qmp_monitor)
> + unknown_commands_suite(vm.qmp_monitor)
> + json_parsing_errors_suite(vm.qmp_monitor)
>
> # check if QMP is still alive
> - if not vm.monitor.is_responsive():
> + if not vm.qmp_monitor.is_responsive():
> raise error.TestFail('QEMU is not alive after QMP testing')
next prev parent reply other threads:[~2011-01-10 17:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1294383461-9425-1-git-send-email-qzhou@redhat.com>
2011-01-10 10:47 ` [PATCH 1/2 RESEND] KVM Test: Introduce qmp_monitor property in 'kvm_vm.VM' qzhou
2011-01-10 17:52 ` Michael Goldish [this message]
2011-01-11 3:55 ` Meneghel Rodrigues
2011-01-11 4:00 ` Lucas Meneghel Rodrigues
2011-01-10 10:48 ` [PATCH 2/2 v2] KVM Test: Fix qmp_basic test failure in qmp-kvm-0.12.* qzhou
2011-01-11 16:58 ` 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=4D2B4775.90003@redhat.com \
--to=mgoldish@redhat.com \
--cc=autotest@test.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=lcapitulino@redhat.com \
--cc=qzhou@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.