[Top][All Lists]

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

[PATCH 4/6] tests/acceptance/virtio_seg_max_adjust: Only test Xen as sup

From: Philippe Mathieu-Daudé
Subject: [PATCH 4/6] tests/acceptance/virtio_seg_max_adjust: Only test Xen as superuser
Date: Wed, 22 Jan 2020 23:32:45 +0100

When running the test unprivileged, we get:

  $ avocado --show=app,machine run tests/acceptance/virtio_seg_max_adjust.py
  JOB ID     : b631d5d692e49b791b211d33b80730315d561d45
  JOB LOG    : job-results/job-2020-01-22T17.56-b631d5d/job.log
  machine: {'name': 'pc-i440fx-2.12', 'seg_max_adjust': 'false', 'device': 
  machine: {'name': 'pc-i440fx-2.0', 'seg_max_adjust': 'false', 'device': 
  machine: {'name': 'xenpv', 'seg_max_adjust': 'false', 'device': 
  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.

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
 tests/acceptance/virtio_seg_max_adjust.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/acceptance/virtio_seg_max_adjust.py 
index f679b0eec7..ad736bcda3 100755
--- a/tests/acceptance/virtio_seg_max_adjust.py
+++ b/tests/acceptance/virtio_seg_max_adjust.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:

reply via email to

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