mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 00:45:18 +00:00
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: Peter Krempa <pkrempa@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
b54af513d6
commit
7e441e2e2c
@ -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);
|
||||
|
14
tests/qemublocktestdata/xml2json/dir-fat-floppy.json
Normal file
14
tests/qemublocktestdata/xml2json/dir-fat-floppy.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
14
tests/qemublocktestdata/xml2json/dir-fat-floppy.xml
Normal file
14
tests/qemublocktestdata/xml2json/dir-fat-floppy.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<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>
|
14
tests/qemublocktestdata/xml2json/dir-fat-readonly.json
Normal file
14
tests/qemublocktestdata/xml2json/dir-fat-readonly.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
13
tests/qemublocktestdata/xml2json/dir-fat-readonly.xml
Normal file
13
tests/qemublocktestdata/xml2json/dir-fat-readonly.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<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>
|
Loading…
x
Reference in New Issue
Block a user