[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 16/29] tests/acceptance/virtio_check_params: Only remove liste
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 16/29] tests/acceptance/virtio_check_params: Only remove listed machines |
Date: |
Wed, 29 Jan 2020 22:23:32 +0100 |
Do not remove unavailable machines, this fixes:
VirtioMaxSegSettingsCheck.test_machine_types: ERROR: list.remove(x): x not in
list (0.12 s)
Reviewed-by: Cornelia Huck <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
TODO check how to use attribute (Wainer)
---
tests/acceptance/virtio_check_params.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/acceptance/virtio_check_params.py
b/tests/acceptance/virtio_check_params.py
index 5458573138..4a417b8ef5 100755
--- a/tests/acceptance/virtio_check_params.py
+++ b/tests/acceptance/virtio_check_params.py
@@ -109,14 +109,15 @@ class VirtioMaxSegSettingsCheck(Test):
return False
def test_machine_types(self):
- # collect all machine types except 'none', 'isapc', 'microvm'
+ EXCLUDED_MACHINES = ['none', 'isapc', 'microvm']
+ # collect all machine types except the ones in EXCLUDED_MACHINES
with QEMUMachine(self.qemu_bin) as vm:
vm.launch()
machines = [m['name'] for m in vm.command('query-machines')]
vm.shutdown()
- machines.remove('none')
- machines.remove('isapc')
- machines.remove('microvm')
+ for m in EXCLUDED_MACHINES:
+ if m in machines:
+ machines.remove(m)
for dev_type in DEV_TYPES:
# create the list of machine types and their parameters.
--
2.21.1
- [PATCH v2 08/29] python/qemu: Add binutils::binary_get_machines(), (continued)
- [PATCH v2 08/29] python/qemu: Add binutils::binary_get_machines(), Philippe Mathieu-Daudé, 2020/01/29
- [PATCH v2 10/29] python/qemu: Add binutils::binary_get_qom_implementations(), Philippe Mathieu-Daudé, 2020/01/29
- [PATCH v2 09/29] tests/acceptance: Use 'machine' tag to check if available in QEMU binary, Philippe Mathieu-Daudé, 2020/01/29
- [PATCH v2 11/29] python/qemu: Add binutils::binary_get_accels(), Philippe Mathieu-Daudé, 2020/01/29
- [PATCH v2 12/29] python/qemu/accel: Use binutils::binary_get_accels(), Philippe Mathieu-Daudé, 2020/01/29
- [PATCH v2 13/29] python/qemu: Add binutils::binary_get_devices(), Philippe Mathieu-Daudé, 2020/01/29
- [PATCH v2 15/29] tests: rename virtio_seg_max_adjust to virtio_check_params, Philippe Mathieu-Daudé, 2020/01/29
- [RFC PATCH v2 14/29] tests/acceptance: Use 'device' tags to check availability in QEMU binary, Philippe Mathieu-Daudé, 2020/01/29
- [PATCH v2 16/29] tests/acceptance/virtio_check_params: Only remove listed machines,
Philippe Mathieu-Daudé <=
- [PATCH v2 17/29] tests/acceptance/virtio_check_params: Improve exception logging, Philippe Mathieu-Daudé, 2020/01/29
- [PATCH v2 19/29] tests/acceptance/virtio_check_params: Only test Xen as superuser, Philippe Mathieu-Daudé, 2020/01/29
- [PATCH v2 18/29] tests/acceptance/virtio_check_params: List machine being tested, Philippe Mathieu-Daudé, 2020/01/29
- [PATCH v2 20/29] tests/acceptance/virtio_check_params: Skip test if arch is not supported, Philippe Mathieu-Daudé, 2020/01/29
- [RFC PATCH v2 21/29] tests/acceptance/virtio_check_params: Kludge to skip tests on MIPS, Philippe Mathieu-Daudé, 2020/01/29
- [PATCH v2 22/29] tests/acceptance/virtio_check_params: Support the s390x architecture, Philippe Mathieu-Daudé, 2020/01/29