qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 7/8] tests/acceptance: avocado_qemu: Refactor the handler


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v4 7/8] tests/acceptance: avocado_qemu: Refactor the handler of 'machine' parameter
Date: Thu, 6 Feb 2020 16:41:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 2/5/20 9:32 PM, Wainer dos Santos Moschetta wrote:
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 <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
  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 c83a75ccbc..443ac02aff 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):


It would be cleaner if you add _param_to_vm_args[] with this fix as 1st patch of the series, then 2nd patch 'Introduce the 'accel' test parameter' on top.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]