Re: [PATCH 3/3] Add test for recursive deletion of snapshot lists

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

 



On 08/26/2011 08:16 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"<berrange@xxxxxxxxxx>

The test case validates it recursive deletion of snapshots
cleans up all children and leaves no orphans behind.
---
  .../domain-snapshot/100-delete-snapshot-children.t |  101 ++++++++++++++++++++
  1 files changed, 101 insertions(+), 0 deletions(-)
  create mode 100644 scripts/domain-snapshot/100-delete-snapshot-children.t

+
+The test case validates it recursive deletion of snapshots
+cleans up all children and leaves no orphans behind.

Good, but incomplete. You also need to test handling of the current snapshot in relation to deletion of children. In the notation where * represents the current snapshot, and using 'parent -> child', if I have:

s1 -> s2 -> s3 -> s4 -> *s5

then delete s2 alone, I should have:

s1 -> s3 -> s4 -> *s5

then if I delete s3 and children, I should have:

*s1

That is, I think your test should also be probing the name of the current snapshot along each phase of the test, to ensure that the current snapshot properly migrates up the tree to the parent of the snapshot subtree that just got deleted, since that was also buggy in 0.9.4.

+diag "Creating a new transient domain";
+my $dom;
+ok_domain(sub { $dom = $conn->create_domain($domxml) }, "created transient domain object");

system checkpoints of running domains are a lot slower than those of inactive persistent guests (that is, 'qemu savevm' takes a lot longer than 'qemu-img snapshot -c'), if that matters at all to your test.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[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]