[libvirt] [PATCH 11/12] tests: qemuxml2xml: Wire up QEMUCaps usage
Peter Krempa
pkrempa at redhat.com
Fri Jan 8 11:39:30 UTC 2016
On Thu, Jan 07, 2016 at 22:50:05 -0500, Cole Robinson wrote:
> Future changes will make some of these tests dependent on specific
> QEMUCaps flags, so wire up the basic handling.
> ---
> tests/qemuxml2xmltest.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
> index c0270d4..32c9fed 100644
> --- a/tests/qemuxml2xmltest.c
> +++ b/tests/qemuxml2xmltest.c
[...]
> @@ -225,6 +229,13 @@ testInfoSet(struct testInfo *info,
> bool different,
> int when)
> {
> + if (!(info->qemuCaps = virQEMUCapsNew()))
> + goto error;
This is not necessary, since ...
> +
> + if (qemuTestCapsCacheInsert(driver.qemuCapsCache, name,
> + info->qemuCaps) < 0)
> + goto error;
... this function allocates the caps if it's called with the third
argument set to NULL.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160108/5e13bbbc/attachment-0001.sig>
More information about the libvir-list
mailing list