[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 19/29] tests/acceptance/virtio_check_params: Only test Xen as
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 19/29] tests/acceptance/virtio_check_params: Only test Xen as superuser |
Date: |
Wed, 29 Jan 2020 22:23:35 +0100 |
When running the test unprivileged, we get:
$ avocado --show=app,machine run tests/acceptance/virtio_check_params.py
JOB ID : b631d5d692e49b791b211d33b80730315d561d45
JOB LOG : job-results/job-2020-01-22T17.56-b631d5d/job.log
(1/1)
tests/acceptance/virtio_check_params.py:VirtioMaxSegSettingsCheck.test_machine_types:
machine: {'name': 'pc-i440fx-2.12', 'seg_max_adjust': 'false', 'device':
'virtio-scsi-pci'}
machine: {'name': 'pc-i440fx-2.0', 'seg_max_adjust': 'false', 'device':
'virtio-scsi-pci'}
machine: {'name': 'xenpv', 'seg_max_adjust': 'false', 'device':
'virtio-scsi-pci'}
FAIL: machine type xenpv: <class 'qemu.qmp.QMPConnectError'> (0.40 s)
Looking at the job.log file we find:
xencall: error: Could not obtain handle on privileged command interface: No
such file or directory
xen be core: xen be core: can't open xen interface
Do not run this test on Xen machines if not superuser.
Acked-by: Cornelia Huck <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
tests/acceptance/virtio_check_params.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/acceptance/virtio_check_params.py
b/tests/acceptance/virtio_check_params.py
index f679b0eec7..ad736bcda3 100755
--- a/tests/acceptance/virtio_check_params.py
+++ b/tests/acceptance/virtio_check_params.py
@@ -118,6 +118,8 @@ class VirtioMaxSegSettingsCheck(Test):
def test_machine_types(self):
EXCLUDED_MACHINES = ['none', 'isapc', 'microvm']
+ if os.geteuid() != 0:
+ EXCLUDED_MACHINES += ['xenfv', 'xenpv']
# collect all machine types except the ones in EXCLUDED_MACHINES
with QEMUMachine(self.qemu_bin) as vm:
vm.launch()
--
2.21.1
- [PATCH v2 09/29] tests/acceptance: Use 'machine' tag to check if available in QEMU binary, (continued)
- [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é, 2020/01/29
- [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é <=
- [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
- [PATCH v2 23/29] tests/acceptance/virtio_check_params: Support the ppc architecture, Philippe Mathieu-Daudé, 2020/01/29
- [PATCH v2 24/29] tests/acceptance/virtio_check_params: Default to -nodefaults, Philippe Mathieu-Daudé, 2020/01/29