From: Wainer dos Santos Moschetta <wainersm@redhat.com>
To: qemu-devel@nongnu.org
Cc: philmd@redhat.com, ehabkost@redhat.com, crosa@redhat.com
Subject: [PATCH v2 3/3] tests/acceptance: avocado_qemu: Refactor the handler of 'machine' parameter
Date: Wed, 18 Dec 2019 14:00:03 -0300 [thread overview]
Message-ID: <20191218170003.31356-4-wainersm@redhat.com> (raw)
In-Reply-To: <20191218170003.31356-1-wainersm@redhat.com>
The Test._param_to_vm_args variable contain VM arguments that should be added
at launch which were originated from test parameters. Use this variable
to set -M from 'machine' parameter as well.
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
---
tests/acceptance/avocado_qemu/__init__.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index aff32668d9..ba9539d511 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -120,6 +120,8 @@ class Test(avocado.Test):
self.machine = self.params.get('machine',
default=self._get_unique_tag_val('machine'))
+ if self.machine:
+ self._param_to_vm_args.extend(['-M', self.machine])
default_qemu_bin = pick_default_qemu_bin(arch=self.arch)
self.qemu_bin = self.params.get('qemu_bin',
@@ -162,8 +164,6 @@ class Test(avocado.Test):
name = str(uuid.uuid4())
if self._vms.get(name) is None:
self._vms[name] = self._new_vm(*args)
- if self.machine is not None:
- self._vms[name].set_machine(self.machine)
return self._vms[name]
def tearDown(self):
--
2.23.0
next prev parent reply other threads:[~2019-12-18 17:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 17:00 [PATCH v2 0/3] Acceptance tests: boot Linux with KVM test Wainer dos Santos Moschetta
2019-12-18 17:00 ` [PATCH v2 1/3] tests/acceptance: avocado_qemu: Introduce the 'accel' test parameter Wainer dos Santos Moschetta
2019-12-18 18:48 ` Thomas Huth
2020-01-10 20:02 ` Wainer dos Santos Moschetta
2020-01-11 8:56 ` Thomas Huth
2020-01-22 1:38 ` Wainer dos Santos Moschetta
2019-12-18 17:00 ` [PATCH v2 2/3] tests/acceptance: boot_linux_console: Add boot Linux with kvm tests Wainer dos Santos Moschetta
2019-12-18 17:00 ` Wainer dos Santos Moschetta [this message]
2020-01-30 22:55 ` [PATCH v2 3/3] tests/acceptance: avocado_qemu: Refactor the handler of 'machine' parameter Philippe Mathieu-Daudé
2020-01-30 23:23 ` Philippe Mathieu-Daudé
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=20191218170003.31356-4-wainersm@redhat.com \
--to=wainersm@redhat.com \
--cc=crosa@redhat.com \
--cc=ehabkost@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).