mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
add nocow test case
Add file in storagevolxml2xmlin and storagevolxml2xmlout, let storagevolxml2xmltest and storagevolschematest cover 'nocow'. Add test case to storagevolxml2argvtest to cover 'nocow'. Signed-off-by: Chunyan Liu <cyliu@suse.com>
This commit is contained in:
parent
a9fd30e633
commit
0b0c641b66
3
tests/storagevolxml2argvdata/qcow2-nocow-compat.argv
Normal file
3
tests/storagevolxml2argvdata/qcow2-nocow-compat.argv
Normal file
@ -0,0 +1,3 @@
|
||||
qemu-img create -f qcow2 -b /dev/null \
|
||||
-o backing_fmt=raw,encryption=on,nocow=on,compat=0.10 \
|
||||
/var/lib/libvirt/images/OtherDemo.img 5242880K
|
3
tests/storagevolxml2argvdata/qcow2-nocow.argv
Normal file
3
tests/storagevolxml2argvdata/qcow2-nocow.argv
Normal file
@ -0,0 +1,3 @@
|
||||
qemu-img create -f qcow2 -b /dev/null \
|
||||
-o backing_fmt=raw,encryption=on,nocow=on \
|
||||
/var/lib/libvirt/images/OtherDemo.img 5242880K
|
@ -296,6 +296,12 @@ mymain(void)
|
||||
DO_TEST("pool-logical", "vol-logical",
|
||||
"pool-dir", "vol-qcow2-nobacking",
|
||||
"logical-from-qcow2", 0, FMT_COMPAT);
|
||||
DO_TEST("pool-dir", "vol-qcow2-nocow",
|
||||
NULL, NULL,
|
||||
"qcow2-nocow", 0, FMT_OPTIONS);
|
||||
DO_TEST("pool-dir", "vol-qcow2-nocow",
|
||||
NULL, NULL,
|
||||
"qcow2-nocow-compat", 0, FMT_COMPAT);
|
||||
|
||||
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
32
tests/storagevolxml2xmlin/vol-qcow2-nocow.xml
Normal file
32
tests/storagevolxml2xmlin/vol-qcow2-nocow.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<volume>
|
||||
<name>OtherDemo.img</name>
|
||||
<key>/var/lib/libvirt/images/OtherDemo.img</key>
|
||||
<source>
|
||||
</source>
|
||||
<capacity unit="G">5</capacity>
|
||||
<allocation>294912</allocation>
|
||||
<target>
|
||||
<path>/var/lib/libvirt/images/OtherDemo.img</path>
|
||||
<format type='qcow2'/>
|
||||
<permissions>
|
||||
<mode>0644</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
<label>unconfined_u:object_r:virt_image_t:s0</label>
|
||||
</permissions>
|
||||
<encryption format='qcow'>
|
||||
<secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/>
|
||||
</encryption>
|
||||
<nocow/>
|
||||
</target>
|
||||
<backingStore>
|
||||
<path>/dev/null</path>
|
||||
<format type='raw'/>
|
||||
<permissions>
|
||||
<mode>0644</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
<label>unconfined_u:object_r:virt_image_t:s0</label>
|
||||
</permissions>
|
||||
</backingStore>
|
||||
</volume>
|
31
tests/storagevolxml2xmlout/vol-qcow2-nocow.xml
Normal file
31
tests/storagevolxml2xmlout/vol-qcow2-nocow.xml
Normal file
@ -0,0 +1,31 @@
|
||||
<volume type='file'>
|
||||
<name>OtherDemo.img</name>
|
||||
<key>/var/lib/libvirt/images/OtherDemo.img</key>
|
||||
<source>
|
||||
</source>
|
||||
<capacity unit='bytes'>5368709120</capacity>
|
||||
<allocation unit='bytes'>294912</allocation>
|
||||
<target>
|
||||
<path>/var/lib/libvirt/images/OtherDemo.img</path>
|
||||
<format type='qcow2'/>
|
||||
<permissions>
|
||||
<mode>0644</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
<label>unconfined_u:object_r:virt_image_t:s0</label>
|
||||
</permissions>
|
||||
<encryption format='qcow'>
|
||||
<secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/>
|
||||
</encryption>
|
||||
</target>
|
||||
<backingStore>
|
||||
<path>/dev/null</path>
|
||||
<format type='raw'/>
|
||||
<permissions>
|
||||
<mode>0644</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
<label>unconfined_u:object_r:virt_image_t:s0</label>
|
||||
</permissions>
|
||||
</backingStore>
|
||||
</volume>
|
Loading…
Reference in New Issue
Block a user