tests: add vol-qcow2-zerocapacity test to storagevolxml2argvtest

Add a testcase for the previous change to ensure zero capacity volumes can be
defined without a backing store.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
This commit is contained in:
Chris J Arges 2015-06-30 15:19:04 -05:00 committed by John Ferlan
parent c6eea54008
commit be6c35e4ac
3 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1 @@
qemu-img create -f qcow2 -o compat=0.10 0K

View File

@ -284,6 +284,9 @@ mymain(void)
DO_TEST("pool-dir", "vol-qcow2-nocapacity",
"pool-dir", "vol-file",
"qcow2-nocapacity-convert-prealloc", flags, FMT_OPTIONS);
DO_TEST("pool-dir", "vol-qcow2-zerocapacity",
NULL, NULL,
"qcow2-zerocapacity", 0, FMT_COMPAT);
DO_TEST_FULL(false, VIR_VOL_XML_PARSE_OPT_CAPACITY,
"pool-dir", "vol-qcow2-nocapacity-backing", NULL, NULL,
"qcow2-nocapacity", 0, FMT_OPTIONS);

View File

@ -0,0 +1,7 @@
<volume>
<name>OtherDemo.img</name>
<target>
<format type="qcow2"/>
</target>
<capacity>0</capacity>
</volume>