Re: [PATCH v4 6/8] test: Implement bulk snapshot operations

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

 



On Mon, Mar 11, 2019 at 09:38:37PM -0500, Eric Blake wrote:
Implement the new API calls for bulk snapshot dump and import. The
bulk of the work is already done by the common code.

Since each connection to test:///default restarts at the same
canned state, this can easily be tested with:

$ virsh -c test:///default "
  snapshot-create-as test s1
  snapshot-create-as test s2
  echo witness
  snapshot-dumpxml test --all" | sed '1,/witness/d' > list.xml
$ virsh -c test:///default "
  snapshot-list test
  snapshot-import test list.xml
  snapshot-current --name test
  snapshot-list --parent test
"
Name   Creation Time   State
-------------------------------

Imported 2 snapshots
s2
Name   Creation Time               State     Parent
------------------------------------------------------
s1     2019-02-20 22:26:52 -0600   running
s2     2019-02-20 22:26:52 -0600   running   s1

The test driver also makes it easy to test input validation, by
modifying list.xml incorrectly (such as trying to attempt circular
dependencies).  Proving that that --topological makes a difference
is a bit harder (since we randomize the hash seed, it is not 100%
reproducible which order you get without it), but I found that
creating snapshots s1, s3, s2 in that order tended to be more likely
to hash in non-topological order without the flag.

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---
src/test/test_driver.c | 62 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 61 insertions(+), 1 deletion(-)


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature

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

  Powered by Linux