As of ad81aa8ad07 the qemuhotplugmock.c calls testQemuPrepareHostBackendChardevOne() which is implemented in testutilsqemu.c. However, the mock is not linked with testutilsqemu static library which makes some tools (valgrind particularly) unhappy because the resulting mock library has unresolved symbol. The fix is simple, link mock library with test_utils_qemu_lib and also with test_utils_lib since testutils.c calls some functions from testutils.c. Since these two libraries are declared only after mock_libs[], I had to move the line that declares qemuhotplugmock after those two. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- tests/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.build index fd78d8a2fd..8d613d23f2 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -107,7 +107,6 @@ if conf.has('WITH_QEMU') mock_libs += [ { 'name': 'qemucaps2xmlmock' }, { 'name': 'qemucpumock' }, - { 'name': 'qemuhotplugmock' }, { 'name': 'qemuxml2argvmock' }, { 'name': 'virhostidmock' }, ] @@ -178,6 +177,7 @@ if conf.has('WITH_QEMU') mock_libs += [ { 'name': 'qemucapsprobemock', 'link_with': [ test_qemu_driver_lib ] }, + { 'name': 'qemuhotplugmock', 'link_with': [ test_utils_qemu_lib, test_utils_lib ] }, ] else test_qemu_driver_lib = [] -- 2.35.1