mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
domainsnapshotxml2xmltest: Add existing files as new tests
There were plenty snapshot XMLs in the tests/domainsnapshotxml2xmlin directory that actually weren't used in XML testing. The upgraded domainsnapshotxml2xml test now allows us to use them.
This commit is contained in:
parent
630adbe08d
commit
a686115cba
@ -6,5 +6,4 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<name>earlier_snap</name>
|
<name>earlier_snap</name>
|
||||||
</parent>
|
</parent>
|
||||||
<creationTime>1272917631</creationTime>
|
|
||||||
</domainsnapshot>
|
</domainsnapshot>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<name>my snap name</name>
|
<name>my snap name</name>
|
||||||
<description>!@#$%^</description>
|
<description>!@#$%^</description>
|
||||||
<state>running</state>
|
<state>running</state>
|
||||||
|
<memory snapshot='internal'/>
|
||||||
<creationTime>1272917631</creationTime>
|
<creationTime>1272917631</creationTime>
|
||||||
<domain>
|
<domain>
|
||||||
<uuid>9d37b878-a7cc-9f9a-b78f-49b3abad25a8</uuid>
|
<uuid>9d37b878-a7cc-9f9a-b78f-49b3abad25a8</uuid>
|
||||||
|
15
tests/domainsnapshotxml2xmlout/disk_snapshot.xml
Normal file
15
tests/domainsnapshotxml2xmlout/disk_snapshot.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<domainsnapshot>
|
||||||
|
<name>my snap name</name>
|
||||||
|
<description>!@#$%^</description>
|
||||||
|
<disks>
|
||||||
|
<disk name='/dev/HostVG/QEMUGuest1'/>
|
||||||
|
<disk name='hdb' snapshot='no'/>
|
||||||
|
<disk name='hdc' snapshot='internal'/>
|
||||||
|
<disk name='hdd' snapshot='external'>
|
||||||
|
<driver type='qed'/>
|
||||||
|
</disk>
|
||||||
|
<disk name='hde' snapshot='external'>
|
||||||
|
<source file='/path/to/new'/>
|
||||||
|
</disk>
|
||||||
|
</disks>
|
||||||
|
</domainsnapshot>
|
8
tests/domainsnapshotxml2xmlout/empty.xml
Normal file
8
tests/domainsnapshotxml2xmlout/empty.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<domainsnapshot>
|
||||||
|
<name>1386166249</name>
|
||||||
|
<state>nostate</state>
|
||||||
|
<creationTime>1386166249</creationTime>
|
||||||
|
<domain>
|
||||||
|
<uuid>9d37b878-a7cc-9f9a-b78f-49b3abad25a8</uuid>
|
||||||
|
</domain>
|
||||||
|
</domainsnapshot>
|
5
tests/domainsnapshotxml2xmlout/external_vm.xml
Normal file
5
tests/domainsnapshotxml2xmlout/external_vm.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<domainsnapshot>
|
||||||
|
<name>my snap name</name>
|
||||||
|
<description>!@#$%^</description>
|
||||||
|
<memory snapshot='external' file='/dev/HostVG/GuestMemory'/>
|
||||||
|
</domainsnapshot>
|
5
tests/domainsnapshotxml2xmlout/name_and_description.xml
Normal file
5
tests/domainsnapshotxml2xmlout/name_and_description.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<domainsnapshot>
|
||||||
|
<name>snap1</name>
|
||||||
|
<description>A longer description!</description>
|
||||||
|
<state>nostate</state>
|
||||||
|
</domainsnapshot>
|
@ -1,7 +1,7 @@
|
|||||||
<domainsnapshot>
|
<domainsnapshot>
|
||||||
<name>my snap name</name>
|
<name>my snap name</name>
|
||||||
<description>!@#$%^</description>
|
<description>!@#$%^</description>
|
||||||
<state>running</state>
|
<state>nostate</state>
|
||||||
<creationTime>1272917631</creationTime>
|
<creationTime>1272917631</creationTime>
|
||||||
<memory snapshot='internal'/>
|
<memory snapshot='internal'/>
|
||||||
<domain>
|
<domain>
|
||||||
|
@ -215,6 +215,16 @@ mymain(void)
|
|||||||
DO_TEST_OUT("metadata", "c7a5fdbd-edaf-9455-926a-d65c16db1809", false);
|
DO_TEST_OUT("metadata", "c7a5fdbd-edaf-9455-926a-d65c16db1809", false);
|
||||||
DO_TEST_OUT("external_vm_redefine", "c7a5fdbd-edaf-9455-926a-d65c16db1809", false);
|
DO_TEST_OUT("external_vm_redefine", "c7a5fdbd-edaf-9455-926a-d65c16db1809", false);
|
||||||
|
|
||||||
|
DO_TEST_INOUT("empty", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", false, false);
|
||||||
|
DO_TEST_INOUT("noparent", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", false, false);
|
||||||
|
DO_TEST_INOUT("external_vm", NULL, false, false);
|
||||||
|
DO_TEST_INOUT("noparent", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", false, false);
|
||||||
|
DO_TEST_INOUT("disk_snapshot", NULL, false, false);
|
||||||
|
|
||||||
|
DO_TEST_IN("name_and_description", NULL);
|
||||||
|
DO_TEST_IN("description_only", NULL);
|
||||||
|
DO_TEST_IN("name_only", NULL);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (testSnapshotXMLVariableLineRegex)
|
if (testSnapshotXMLVariableLineRegex)
|
||||||
regfree(testSnapshotXMLVariableLineRegex);
|
regfree(testSnapshotXMLVariableLineRegex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user