]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Link qemuxml2argvmock with test_utils_lib
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 26 May 2026 13:18:52 +0000 (15:18 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 27 May 2026 13:24:22 +0000 (15:24 +0200)
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 <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
tests/meson.build

index 83aa0104bb73b424874e495cf16edc56c6f615b5..d1d26fcea2c7935f5f98c43db25db54dfbeb5547 100644 (file)
@@ -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