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