mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-05 12:51:12 +00:00
c8d5703150
Invoke the majority of the command via DO_TEST_SCRIPT in 'virshtest'. Some adaptation was needed to avoid printing of tables with volatile data such as snapshot creation time, which were converted to list names-only. To proprely test redefinition we store XMLs rather than taking them from the defined snapshots and use them separately to test redefinition of snapshot XMLs. This makes use of the 'cd' command in non-interactive mode. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
55 lines
1.6 KiB
Plaintext
Executable File
55 lines
1.6 KiB
Plaintext
Executable File
echo Create a series of snapshots, with names that intentionally sort
|
|
echo differently by topology than by name. Use revert to create fanout.
|
|
snapshot-create-as test s1
|
|
snapshot-create-as test s1
|
|
snapshot-create-as test s3
|
|
snapshot-create-as test s2
|
|
snapshot-revert test s3
|
|
snapshot-create-as test s6
|
|
snapshot-create-as test s5
|
|
snapshot-revert test s6
|
|
snapshot-create-as test s4
|
|
snapshot-revert test s1
|
|
snapshot-create-as test s7
|
|
snapshot-create-as test s8
|
|
|
|
echo checkpoints cannot be created while snapshots exist
|
|
checkpoint-create-as test c1
|
|
|
|
echo Checking tree view (siblings sorted alphabetically)
|
|
snapshot-list test --tree
|
|
|
|
echo Current was last one created, but we can change that
|
|
snapshot-current test --name
|
|
snapshot-current test s1
|
|
snapshot-current test --name
|
|
|
|
echo Deleting current root leads to multiple roots, demonstrate list filtering
|
|
snapshot-delete test --current
|
|
snapshot-current test --name
|
|
|
|
echo list roots
|
|
snapshot-list test --roots --name
|
|
echo list leaves
|
|
snapshot-list test --leaves --name
|
|
echo list no-leaves
|
|
snapshot-list test --parent --no-leaves --name
|
|
echo list from
|
|
snapshot-list test --from s3 --name
|
|
snapshot-list test --from s3 --descendants --name
|
|
|
|
echo More fun with delete flags, current node moves up to remaining parent
|
|
snapshot-current test s4
|
|
snapshot-delete test --children-only s6
|
|
snapshot-current test --name
|
|
snapshot-delete test --children s7
|
|
snapshot-current test --name
|
|
snapshot-delete test s6
|
|
snapshot-current test --name
|
|
|
|
echo Now the tree is linear, so we have an unambiguous topological order
|
|
snapshot-list test --name
|
|
snapshot-list test --name --topological
|
|
snapshot-dumpxml test s3
|
|
snapshot-dumpxml test s2
|