[libvirt] [PATCH v6 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

Marek Marczykowski-Górecki marmarek at invisiblethingslab.com
Tue Mar 27 22:58:17 UTC 2018


On Wed, Mar 28, 2018 at 12:38:22AM +0200, Marek Marczykowski-Górecki wrote:
> On Tue, Mar 27, 2018 at 04:34:27PM -0600, Jim Fehlig wrote:
> > Did you have an opportunity to look at this problem on Xen 4.5?
> 
> Actually I'm on it right now. Getting Xen 4.5 built using modern gcc is
> kind of a challenge, thanks to -Werror...

Ok, found it - libxlDriverConfigNew calls libxl_get_free_memory, which
tries to access xenstore. But in tests we have mocks for
xs_daemon_open, which returns handle (void*)0x1. Using this handle
obviously leads to SEGV.

Previously it worked because libxlDriverConfigNew wasn't needed during
tests.

Solution: add mock for libxl_get_free_memory (its return value isn't
even used - its purpose is to initialize xenstore entries):

    VIR_MOCK_STUB_RET_ARGS(libxl_get_free_memory,
                           int, 0,
                           libxl_ctx *, ctx,
                           uint32_t *, memkb);

Do you want new version of this patch, or the whole series?

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180328/dda3607e/attachment-0001.sig>


More information about the libvir-list mailing list