From: Denis Plotnikov <dplotnikov@virtuozzo.com>
To: qemu-devel@nongnu.org
Cc: cohuck@redhat.com, philmd@redhat.com, wainersm@redhat.com
Subject: [PATCH v1 1/2] tests/acceptance/virtio_check_params: remove excluded machine types carefully
Date: Tue, 11 Feb 2020 17:25:50 +0300 [thread overview]
Message-ID: <20200211142551.13072-2-dplotnikov@virtuozzo.com> (raw)
In-Reply-To: <20200211142551.13072-1-dplotnikov@virtuozzo.com>
Before, the test failed if an excluded machine type was absent in the machine
types lists.
Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
---
tests/acceptance/virtio_check_params.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/tests/acceptance/virtio_check_params.py b/tests/acceptance/virtio_check_params.py
index 87e6c839d1..deec89bf86 100644
--- a/tests/acceptance/virtio_check_params.py
+++ b/tests/acceptance/virtio_check_params.py
@@ -40,6 +40,8 @@ VM_DEV_PARAMS = {'virtio-scsi-pci': ['-device', 'virtio-scsi-pci,id=scsi0'],
'-drive',
'driver=null-co,id=drive0,if=none']}
+EXCLUDED_MACHINES = ['none', 'isapc', 'microvm']
+
class VirtioMaxSegSettingsCheck(Test):
@staticmethod
@@ -117,6 +119,13 @@ class VirtioMaxSegSettingsCheck(Test):
return True
return False
+ @staticmethod
+ def filter_machines(machines):
+ for mt in EXCLUDED_MACHINES:
+ if mt in machines:
+ machines.remove(mt)
+ return machines
+
@skip("break multi-arch CI")
def test_machine_types(self):
# collect all machine types except 'none', 'isapc', 'microvm'
@@ -124,9 +133,8 @@ class VirtioMaxSegSettingsCheck(Test):
vm.launch()
machines = [m['name'] for m in vm.command('query-machines')]
vm.shutdown()
- machines.remove('none')
- machines.remove('isapc')
- machines.remove('microvm')
+
+ machines = self.filter_machines(machines)
for dev_type in DEV_TYPES:
# create the list of machine types and their parameters.
--
2.17.0
next prev parent reply other threads:[~2020-02-11 14:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 14:25 [PATCH v1 0/2] Improve virtio_check_params test Denis Plotnikov
2020-02-11 14:25 ` Denis Plotnikov [this message]
2020-02-11 14:25 ` [PATCH v1 2/2] tests/acceptance/virtio_check_params: prepare to check different params Denis Plotnikov
2020-02-11 14:37 ` [PATCH v1 0/2] Improve virtio_check_params test Philippe Mathieu-Daudé
2020-02-11 14:48 ` Denis Plotnikov
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=20200211142551.13072-2-dplotnikov@virtuozzo.com \
--to=dplotnikov@virtuozzo.com \
--cc=cohuck@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wainersm@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 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).