提交 9b804ef5 编写于 作者: P Peter Krempa

tests: qemublock: Add cases for creating image overlays on top of disks with <slice>

Add a set of test data to see whether the backing store strings are
formatted reasonably. Note that we don't support direct creation of such
images so those tests are not enabled.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 73ca2014
......@@ -1064,6 +1064,8 @@ mymain(void)
TEST_IMAGE_CREATE("qcow2-backing-raw-nbd", "raw-nbd");
TEST_IMAGE_CREATE("qcow2-backing-luks", "luks-noopts");
TEST_IMAGE_CREATE("qcow2-luks-encopts-backing", "qcow2");
TEST_IMAGE_CREATE("qcow2-backing-raw-slice", "raw-slice");
TEST_IMAGE_CREATE("qcow2-backing-qcow2-slice", "qcow2-slice");
TEST_IMAGE_CREATE("network-gluster-qcow2", NULL);
TEST_IMAGE_CREATE("network-rbd-qcow2", NULL);
......
protocol:
{
"driver": "file",
"filename": "/var/lib/libvirt/images/i.qcow2",
"size": 4294967296
}
format:
{
"driver": "qcow2",
"file": "0123456789ABCDEF0123456789ABCDE",
"size": 8589934590,
"backing-file": "json:{\"driver\":\"raw\",\"offset\":1234,\"size\":5768,\"file\":{\"driver\":\"file\",\"filename\":\"/var/lib/libvirt/images/i.qcow2\"}}",
"backing-fmt": "qcow2"
}
protocol:
{
"driver": "file",
"filename": "/var/lib/libvirt/images/i.qcow2",
"size": 4294967296
}
format:
{
"driver": "qcow2",
"file": "0123456789ABCDEF0123456789ABCDE",
"size": 8589934590,
"backing-file": "json:{\"driver\":\"raw\",\"offset\":9876,\"size\":54321,\"file\":{\"driver\":\"file\",\"filename\":\"/var/lib/libvirt/images/i.img\"}}",
"backing-fmt": "raw"
}
<disk device='disk' name='vda'>
<driver type='qcow2'/>
<source file='/var/lib/libvirt/images/i.qcow2'>
<slices>
<slice type='storage' offset='1234' size='5768'/>
</slices>
<privateData>
<nodenames>
<nodename type='storage' name='0123456789ABCDEF0123456789ABCDE'/>
<nodename type='format' name='0123456789ABCDEF0123456789ABCDE'/>
</nodenames>
</privateData>
</source>
</disk>
<disk device='disk' name='vda'>
<driver type='raw'/>
<source file='/var/lib/libvirt/images/i.img'>
<slices>
<slice type='storage' offset='9876' size='54321'/>
</slices>
<privateData>
<nodenames>
<nodename type='storage' name='0123456789ABCDEF0123456789ABCDE'/>
<nodename type='format' name='0123456789ABCDEF0123456789ABCDE'/>
</nodenames>
</privateData>
</source>
</disk>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册