mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
qemublocktest: xml->json: Add test for NVMe
Based on the configuration from the only qemuxml2argv test. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
5793b8baa7
commit
2337dbfdd1
@ -1203,6 +1203,8 @@ mymain(void)
|
||||
TEST_DISK_TO_JSON("block-raw-noopts");
|
||||
TEST_DISK_TO_JSON("block-raw-reservations");
|
||||
|
||||
TEST_DISK_TO_JSON("nvme-raw-noopts");
|
||||
|
||||
#define TEST_JSON_TO_JSON(nme) \
|
||||
do { \
|
||||
jsontojsondata.name = nme; \
|
||||
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"driver": "nvme",
|
||||
"device": "0000:01:00.0",
|
||||
"namespace": 1
|
||||
}
|
14
tests/qemublocktestdata/xml2json/nvme-raw-noopts.json
Normal file
14
tests/qemublocktestdata/xml2json/nvme-raw-noopts.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"node-name": "0123456789ABCDEF0123456789ABCDE",
|
||||
"read-only": false,
|
||||
"driver": "raw",
|
||||
"file": "0123456789ABCDEF0123456789ABCDE"
|
||||
}
|
||||
{
|
||||
"driver": "nvme",
|
||||
"device": "0000:01:00.0",
|
||||
"namespace": 1,
|
||||
"node-name": "0123456789ABCDEF0123456789ABCDE",
|
||||
"auto-read-only": true,
|
||||
"discard": "unmap"
|
||||
}
|
13
tests/qemublocktestdata/xml2json/nvme-raw-noopts.xml
Normal file
13
tests/qemublocktestdata/xml2json/nvme-raw-noopts.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<disk type='nvme' device='disk'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<source type='pci' managed='yes' namespace='1'>
|
||||
<address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
|
||||
<privateData>
|
||||
<nodenames>
|
||||
<nodename type='storage' name='0123456789ABCDEF0123456789ABCDE'/>
|
||||
<nodename type='format' name='0123456789ABCDEF0123456789ABCDE'/>
|
||||
</nodenames>
|
||||
</privateData>
|
||||
</source>
|
||||
<target dev='vda' bus='virtio'/>
|
||||
</disk>
|
Loading…
Reference in New Issue
Block a user