]> xenbits.xensource.com Git - libvirt.git/commit
qemucapsprobemock: Fix lookup of qemu functions
authorRoman Bolshakov <r.bolshakov@yadro.com>
Mon, 23 Nov 2020 22:10:18 +0000 (01:10 +0300)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 27 Nov 2020 15:31:50 +0000 (16:31 +0100)
commit78999beabc16c6ad3ee0838cf7d9d4c95d717b83
tree15ae5fe099ae509f0cd53a7c40bd0ec79d72937b
parent11e67a2910aaa65f89282684b5512454495cfc1e
qemucapsprobemock: Fix lookup of qemu functions

qemucapsprobemock can't find real versions of qemuMonitorSend() and
qemuMonitorJSONIOProcessLine() on macOS. That breaks qemucapsprobe.

The failure can be explained by documented behaviour of dlsym(3) on
macOS:

  If dlsym() is called with the special handle RTLD_NEXT, then dyld
  searches for the symbol in the dylibs the calling image linked against
  when built.

  [...] For flat linked images, the search starts in the load ordered
  list of all images, in the image right after the caller's image.

That means qemucapsprobemock must be linked against qemu test driver to
find symbols there with RTLD_NEXT.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/meson.build