From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Richard Henderson <richard.henderson@linaro.org>
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Subject: [PULL 2/6] tests/functional/qemu_test: drop *args argument from .get_vm()
Date: Fri, 14 Aug 2026 12:09:13 +0200 [thread overview]
Message-ID: <20260814100917.163448-3-thuth@redhat.com> (raw)
In-Reply-To: <20260814100917.163448-1-thuth@redhat.com>
From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
It's redundant. Only one caller use it, and it may be simply
substituted by .add_args().
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260729093146.1893719-3-vsementsov@yandex-team.ru>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/functional/migration.py | 3 ++-
tests/functional/qemu_test/testcase.py | 9 +++------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/tests/functional/migration.py b/tests/functional/migration.py
index 4344e03be41..8d2428efc24 100644
--- a/tests/functional/migration.py
+++ b/tests/functional/migration.py
@@ -63,7 +63,8 @@ def migrate_vms(self, dst_uri, src_uri, dst_vm, src_vm):
self.assert_dest_vm(dst_vm)
def migrate(self, dst_uri, src_uri=None):
- dst_vm = self.get_vm('-incoming', 'defer', name="dst-qemu")
+ dst_vm = self.get_vm("dst-qemu")
+ dst_vm.add_args('-incoming', 'defer')
self.configure_machine(dst_vm)
dst_vm.launch()
diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index e4179d165c0..12ef84281c4 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -381,7 +381,7 @@ def require_device(self, devicename):
if helptxt.find(devicename) < 0:
self.skipTest('no support for device ' + devicename)
- def _new_vm(self, name, *args):
+ def _new_vm(self, name):
vm = QEMUMachine(self.qemu_bin,
name=name,
base_temp_dir=self.workdir,
@@ -394,20 +394,17 @@ def _new_vm(self, name, *args):
vm.add_args("-chardev",
f"socket,id=backdoor,path={sockpath},server=on,wait=off",
"-mon", "chardev=backdoor,mode=control")
-
- if args:
- vm.add_args(*args)
return vm
@property
def vm(self):
return self.get_vm(name='default')
- def get_vm(self, *args, name=None):
+ def get_vm(self, name=None):
if not name:
name = str(uuid.uuid4())
if self._vms.get(name) is None:
- self._vms[name] = self._new_vm(name, *args)
+ self._vms[name] = self._new_vm(name)
if self.cpu is not None:
self._vms[name].add_args('-cpu', self.cpu)
if self.machine is not None:
--
2.55.0
next prev parent reply other threads:[~2026-08-14 10:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 10:09 [PULL 0/6] Functional test framework improvements & bug fixes Thomas Huth
2026-08-14 10:09 ` [PULL 1/6] tests/functional: add skipWithoutSudo() decorator Thomas Huth
2026-08-14 10:09 ` Thomas Huth [this message]
2026-08-14 10:09 ` [PULL 3/6] tests/testcase.py: passthrough monitor_address Thomas Huth
2026-08-14 10:09 ` [PULL 4/6] hw/usb/dev-uas: Don't abort if guest provided an undersized buffer for status Thomas Huth
2026-08-14 10:09 ` [PULL 5/6] hw/net/vmxnet3: Do not abort if guest provides bad interrupt numbers Thomas Huth
2026-08-14 10:09 ` [PULL 6/6] hw/i386/amd_iommu: Avoid undefined behavior in amdvi_setevent_bits() Thomas Huth
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=20260814100917.163448-3-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=vsementsov@yandex-team.ru \
/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.