From 1fbd80c42a6b96a92c0daec2c23cec4de6c43f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 27 Nov 2019 17:11:20 +0000 Subject: [PATCH] tests: stop static linking to libvirt code in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we static link to libvirt_util.la then we can't override functions in this file by simply implementing them in the test code. Any tests should dynamic link to the main libvirt.la and ensure symbols are exported. Reviewed-by: Michal Privoznik Signed-off-by: Daniel P. Berrangé --- src/libvirt_private.syms | 2 ++ tests/Makefile.am | 11 +++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 8fe0bf9365..0864de030b 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -915,6 +915,8 @@ virDomainSnapshotDefFormat; virDomainSnapshotDefIsExternal; virDomainSnapshotDefNew; virDomainSnapshotDefParseString; +virDomainSnapshotDiskDefFree; +virDomainSnapshotDiskDefParseXML; virDomainSnapshotFormatConvertXMLFlags; virDomainSnapshotIsExternal; virDomainSnapshotLocationTypeFromString; diff --git a/tests/Makefile.am b/tests/Makefile.am index ac4c0e1a3a..cbe8e86224 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -655,8 +655,7 @@ qemublocktest_SOURCES = \ $(NULL) qemublocktest_LDADD = \ libqemumonitortestutils.la \ - ../src/libvirt_conf.la \ - ../src/libvirt_util.la \ + ../src/libvirt.la \ $(qemu_LDADDS) \ $(NULL) @@ -930,8 +929,7 @@ storagevolxml2argvtest_SOURCES = \ storagevolxml2argvtest_LDADD = \ $(LIBXML_LIBS) \ ../src/libvirt_driver_storage_impl.la \ - ../src/libvirt_conf.la \ - ../src/libvirt_util.la \ + ../src/libvirt.la \ $(LDADDS) storagepoolxml2argvtest_SOURCES = \ @@ -940,8 +938,7 @@ storagepoolxml2argvtest_SOURCES = \ storagepoolxml2argvtest_LDADD = \ $(LIBXML_LIBS) \ ../src/libvirt_driver_storage_impl.la \ - ../src/libvirt_conf.la \ - ../src/libvirt_util.la \ + ../src/libvirt.la \ $(LDADDS) storagepoolxml2xmltest_SOURCES = \ @@ -1141,8 +1138,6 @@ virstoragetest_SOURCES = \ virstoragetest.c testutils.h testutils.c virstoragetest_LDADD = $(LDADDS) \ ../src/libvirt.la \ - ../src/libvirt_conf.la \ - ../src/libvirt_util.la \ ../src/libvirt_driver_storage_impl.la \ ../gnulib/lib/libgnu.la \ $(NULL) -- GitLab