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

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



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

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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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