[PATCH] tests: Don't use testutils in mock libraries

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

 



Mock libraries are not built with testutils.c, but there's one which
uses VIR_TEST_DEBUG.  But because that debug should be an error, if we
change it, then it will not only be more semantically correct, but mingw
compiler will be happier as well.

It also follows suit with all other mock libraries.

For few other things, used in this file, need libvirt.la to be added
into LIBADD for mingw as well.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 tests/Makefile.am            | 1 +
 tests/virportallocatortest.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index bde7f5baf1fe..4af38fe9c14b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1020,6 +1020,7 @@ libvirportallocatormock_la_SOURCES = \
 	virportallocatortest.c
 libvirportallocatormock_la_CFLAGS = $(AM_CFLAGS) -DMOCK_HELPER=1
 libvirportallocatormock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
+libvirportallocatormock_la_LIBADD = ../src/libvirt.la

 vircgrouptest_SOURCES = \
 	vircgrouptest.c testutils.h testutils.c
diff --git a/tests/virportallocatortest.c b/tests/virportallocatortest.c
index 1125b0aeedda..58b2155994f9 100644
--- a/tests/virportallocatortest.c
+++ b/tests/virportallocatortest.c
@@ -49,7 +49,7 @@ static void init_syms(void)
     realsocket = dlsym(RTLD_NEXT, "socket");

     if (!realsocket) {
-        VIR_TEST_DEBUG("Unable to find 'socket' symbol\n");
+        fprintf(stderr, "Unable to find 'socket' symbol\n");
         abort();
     }

-- 
2.5.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]