[PATCH] tests: Link mocks with libvirt.so

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

 



In a lot of our mocks (if not all of them) we use our internal
APIs (e.g. VIR_ALLOC). So far, we're relying on test binary that
links with the mock to drag in libvirt.so. Well, this works only
partially. Firstly, whatever binary we execute from tests will
fail (e.g. as Martin reported on the list ./qemucapsprobe fails
to execute qemu). Secondly, if there's a program that tries to
validate linking (like valgrind is doing) it fails because of
unresolved symbols.

Because of that we have to link our mocks with libvirt.so.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 tests/Makefile.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 621480dd0c..ac92190845 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -81,7 +81,8 @@ LDADDS = \
 	../src/libvirt.la
 
 MOCKLIBS_LIBS = \
-	$(GNULIB_LIBS)
+	$(GNULIB_LIBS) \
+	../src/libvirt.la
 
 EXTRA_DIST = \
 	.valgrind.supp \
-- 
2.16.1

--
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