[libvirt] [PATCH v9 09/13] backup: test: Implement metadata tracking for checkpoint APIs

Peter Krempa pkrempa at redhat.com
Mon Jul 8 13:30:16 UTC 2019


On Sat, Jul 06, 2019 at 22:56:09 -0500, Eric Blake wrote:
> A lot of this work heavily copies from the existing snapshot APIs.
> The test driver doesn't really have to do anything more than just
> expose an interface into libvirt metadata, making it possible to test
> saving and restoring XML, and tracking relations between multiple
> checkpoints.
> 
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
>  src/test/test_driver.c | 390 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 390 insertions(+)
> 
> diff --git a/src/test/test_driver.c b/src/test/test_driver.c
> index e7ad4dbbd7..ddc8867bdd 100644
> --- a/src/test/test_driver.c
> +++ b/src/test/test_driver.c

[...]

> @@ -7174,6 +7176,12 @@ testDomainSnapshotCreateXML(virDomainPtr domain,
>      if (!(vm = testDomObjFromDomain(domain)))
>          goto cleanup;
> 
> +    if (virDomainListCheckpoints(vm->checkpoints, NULL, domain, NULL, 0) > 0) {
> +        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
> +                       _("cannot create snapshot while checkpoint exists"));
> +        goto cleanup;
> +    }
> +

Hmmm, I don't see much point in modeling this though ...

Especially since I don't think it will be removed once the qemu driver
gains the ability.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190708/d35e09c1/attachment-0001.sig>


More information about the libvir-list mailing list