From: Michal Privoznik <[email protected]>

When running qemuxmlconftest under valgrind, it fails with a
symbol lookup error:

  valgrind: symbol lookup error: 
libvirt.git/_build/tests/libqemuxml2argvmock.so: undefined symbol: 
virTestMakeDummyFD

This occurs because qemuxml2argvmock uses the
virTestMakeDummyFD() function (implemented in testutils.c) but
does not explicitly link against test_utils_lib. Fix this by
linking the test utils library to the mock library, statically.

Signed-off-by: Michal Privoznik <[email protected]>
---
 tests/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/meson.build b/tests/meson.build
index 83aa0104bb..d1d26fcea2 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -177,7 +177,7 @@ if conf.has('WITH_QEMU')
     { 'name': 'qemucapsprobemock', 'link_with': [ test_qemu_driver_lib ] },
     { 'name': 'qemucpumock' },
     { 'name': 'qemuhotplugmock', 'link_with': [ test_qemu_driver_lib, 
test_utils_qemu_lib, test_utils_lib ] },
-    { 'name': 'qemuxml2argvmock' },
+    { 'name': 'qemuxml2argvmock', 'link_with': [ test_utils_lib ] },
     { 'name': 'virhostidmock' },
   ]
 else
-- 
2.53.0

Reply via email to