[libvirt] [PATCH] virfiletest: Load mock on Linux only

Michal Privoznik posted 1 patch 5 years, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/6316429b366e442bfdc65adc3ffcef15ec429d4e.1539247027.git.mprivozn@redhat.com
tests/virfiletest.c | 4 ++++
1 file changed, 4 insertions(+)
[libvirt] [PATCH] virfiletest: Load mock on Linux only
Posted by Michal Privoznik 5 years, 6 months ago
The mock is built on Linux only. Therefore we should load it only
on Linux too. This fixes the FreeBSD build.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 tests/virfiletest.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/virfiletest.c b/tests/virfiletest.c
index d5102b1cc4..1f2be74c8d 100644
--- a/tests/virfiletest.c
+++ b/tests/virfiletest.c
@@ -460,4 +460,8 @@ mymain(void)
     return ret != 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
 
+#ifdef __linux__
 VIR_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/virfilemock.so")
+#else
+VIR_TEST_MAIN(mymain)
+#endif
-- 
2.18.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] virfiletest: Load mock on Linux only
Posted by Andrea Bolognani 5 years, 6 months ago
On Thu, 2018-10-11 at 10:37 +0200, Michal Privoznik wrote:
> The mock is built on Linux only. Therefore we should load it only
> on Linux too. This fixes the FreeBSD build.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  tests/virfiletest.c | 4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization

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