提交 7e441e2e 编写于 作者: P Peter Krempa

tests: qemublock: Add test-case for the 'vvfat' driver in qemu

Test mapping of the 'FAT' disk format to 'vvfat' in qemu.

The top level disk image would generate the following '-drive' cmdline:

dir-fat-readonly.xml:
-drive file=fat:/var/somefiles,if=none,id=drive-dummy,readonly=on
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy

dir-fat-floppy.xml
-drive file=fat:floppy:/var/somefiles,if=none,id=drive-dummy,readonly=on
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 b54af513
......@@ -415,6 +415,8 @@ mymain(void)
TEST_DISK_TO_JSON("file-vpc-noopts");
TEST_DISK_TO_JSON("file-backing_basic-noopts");
TEST_DISK_TO_JSON("dir-fat-readonly");
TEST_DISK_TO_JSON("dir-fat-floppy");
cleanup:
virHashFree(diskxmljsondata.schema);
......
{
"node-name": "node-f",
"read-only": true,
"driver": "raw",
"file": {
"driver": "vvfat",
"dir": "/var/somefiles",
"floppy": true,
"rw": false,
"node-name": "node-s",
"read-only": true,
"discard": "unmap"
}
}
<disk type='dir' device='floppy'>
<driver name='qemu' type='fat'/>
<source dir='/var/somefiles'>
<privateData>
<nodenames>
<nodename type='storage' name='node-s'/>
<nodename type='format' name='node-f'/>
</nodenames>
</privateData>
</source>
<target dev='fda'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
<readonly/>
</disk>
{
"node-name": "node-f",
"read-only": true,
"driver": "raw",
"file": {
"driver": "vvfat",
"dir": "/var/somefiles",
"floppy": false,
"rw": false,
"node-name": "node-s",
"read-only": true,
"discard": "unmap"
}
}
<disk type='dir' device='disk'>
<driver name='qemu' type='fat'/>
<source dir='/var/somefiles'>
<privateData>
<nodenames>
<nodename type='storage' name='node-s'/>
<nodename type='format' name='node-f'/>
</nodenames>
</privateData>
</source>
<target dev='vda'/>
<readonly/>
</disk>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册