[libvirt] [PATCH 3/4] tests: Fix qemuxml2xmltest on FreeBSD

Andrea Bolognani abologna at redhat.com
Fri Apr 27 15:21:22 UTC 2018


When hostdevs are involved, libvirt needs to poke into sysfs to
collect some information about them; since that pseudo-filesystem
doesn't exist on platforms other than Linux, the corresponding
tests would fail and need to be compiled out.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 tests/qemuxml2xmltest.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 4b5aa2315e..e3c1386f58 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -600,6 +600,8 @@ mymain(void)
     DO_TEST("pseries-many-buses-2",
             QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
             QEMU_CAPS_VIRTIO_SCSI);
+
+# ifdef __linux__
     DO_TEST("pseries-hostdevs-1",
             QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
             QEMU_CAPS_VIRTIO_SCSI,
@@ -612,6 +614,7 @@ mymain(void)
             QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
             QEMU_CAPS_VIRTIO_SCSI,
             QEMU_CAPS_DEVICE_VFIO_PCI);
+# endif /* __linux__ */
 
     DO_TEST("pseries-features",
             QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
-- 
2.14.3




More information about the libvir-list mailing list