[PATCH 2/4] tests: Fix qemumemlocktest on FreeBSD

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

 



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@xxxxxxxxxx>
---
 tests/qemumemlocktest.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/qemumemlocktest.c b/tests/qemumemlocktest.c
index bc0b53e6fa..1e5d06ea96 100644
--- a/tests/qemumemlocktest.c
+++ b/tests/qemumemlocktest.c
@@ -120,12 +120,18 @@ mymain(void)
 
     DO_TEST("pc-hardlimit", 2147483648);
     DO_TEST("pc-locked", VIR_DOMAIN_MEMORY_PARAM_UNLIMITED);
+
+#  ifdef __linux__
     DO_TEST("pc-hostdev", 2147483648);
+#  endif /* __linux */
 
     DO_TEST("pc-hardlimit+locked", 2147483648);
+
+#  ifdef __linux__
     DO_TEST("pc-hardlimit+hostdev", 2147483648);
     DO_TEST("pc-hardlimit+locked+hostdev", 2147483648);
     DO_TEST("pc-locked+hostdev", VIR_DOMAIN_MEMORY_PARAM_UNLIMITED);
+#  endif /* __linux */
 
     qemuTestSetHostArch(driver.caps, VIR_ARCH_PPC64);
     if (!(qemuCaps = virQEMUCapsNew())) {
@@ -144,12 +150,18 @@ mymain(void)
 
     DO_TEST("pseries-hardlimit", 2147483648);
     DO_TEST("pseries-locked", VIR_DOMAIN_MEMORY_PARAM_UNLIMITED);
+
+#  ifdef __linux__
     DO_TEST("pseries-hostdev", 4320133120);
+#  endif /* __linux */
 
     DO_TEST("pseries-hardlimit+locked", 2147483648);
+
+#  ifdef __linux__
     DO_TEST("pseries-hardlimit+hostdev", 2147483648);
     DO_TEST("pseries-hardlimit+locked+hostdev", 2147483648);
     DO_TEST("pseries-locked+hostdev", VIR_DOMAIN_MEMORY_PARAM_UNLIMITED);
+#  endif /* __linux */
 
  cleanup:
     virObjectUnref(qemuCaps);
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux