mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
domainsnapshotxml2xmltest: Add test case for empty driver element
Commit 5a66c667ff
fixed a NULL dereference
if the disk driver element was empty. Add a test for this case.
This commit is contained in:
parent
a686115cba
commit
2cb2abc04d
10
tests/domainsnapshotxml2xmlin/disk_driver_name_null.xml
Normal file
10
tests/domainsnapshotxml2xmlin/disk_driver_name_null.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<domainsnapshot>
|
||||
<name>asdf</name>
|
||||
<description>adsf</description>
|
||||
<disks>
|
||||
<disk name='vda' snapshot='external'>
|
||||
<source file='/tmp/foo'/>
|
||||
<driver/>
|
||||
</disk>
|
||||
</disks>
|
||||
</domainsnapshot>
|
9
tests/domainsnapshotxml2xmlout/disk_driver_name_null.xml
Normal file
9
tests/domainsnapshotxml2xmlout/disk_driver_name_null.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<domainsnapshot>
|
||||
<name>asdf</name>
|
||||
<description>adsf</description>
|
||||
<disks>
|
||||
<disk name='vda' snapshot='external'>
|
||||
<source file='/tmp/foo'/>
|
||||
</disk>
|
||||
</disks>
|
||||
</domainsnapshot>
|
@ -220,6 +220,7 @@ mymain(void)
|
||||
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_INOUT("disk_driver_name_null", NULL, false, false);
|
||||
|
||||
DO_TEST_IN("name_and_description", NULL);
|
||||
DO_TEST_IN("description_only", NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user