[libvirt] [PATCH 02/11] Mark the domain as active in qemuhotplugtest

Michal Privoznik mprivozn at redhat.com
Wed Dec 17 12:19:12 UTC 2014


On 16.12.2014 17:41, Ján Tomko wrote:
> This will allow us to call qemuDomainObjIsActive() in
> the tested functions to check if the domain has crashed.
> ---
>   tests/qemuhotplugtest.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
> index 9d39968..49e4272 100644
> --- a/tests/qemuhotplugtest.c
> +++ b/tests/qemuhotplugtest.c
> @@ -90,6 +90,8 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt,
>       if (qemuAssignDeviceAliases((*vm)->def, priv->qemuCaps) < 0)
>           goto cleanup;
>
> +    (*vm)->def->id = 7;
> +
>       ret = 0;
>    cleanup:
>       return ret;
> @@ -177,9 +179,11 @@ testQemuHotplugCheckResult(virDomainObjPtr vm,
>       char *actual;
>       int ret;
>
> +    vm->def->id = -1;
>       actual = virDomainDefFormat(vm->def, VIR_DOMAIN_XML_SECURE);
>       if (!actual)
>           return -1;
> +    vm->def->id = 7;
>
>       if (STREQ(expected, actual)) {
>           if (fail && virTestGetVerbose())
>

Can you turn the domain ID into a macro?

ACK

Michal




More information about the libvir-list mailing list