On Wed, May 27, 2026 at 08:53:03 +0200, Michal Privoznik via Devel wrote:
From: Michal Privoznik <mprivozn@redhat.com>
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.
Hmm, weirdly enough, on my machine valgrind din't report that error. Nevertheless this works even on my box so:
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- 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
Reviewed-by: Peter Krempa <pkrempa@redhat.com>