Re: [PATCH v2 6/6] qemucapsprobemock: Fix lookup of qemu functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/23/20 11:10 PM, Roman Bolshakov wrote:
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@xxxxxxxxx>
---
  tests/meson.build | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux