提交 2337dbfd 编写于 作者: P Peter Krempa

qemublocktest: xml->json: Add test for NVMe

Based on the configuration from the only qemuxml2argv test.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 5793b8ba
......@@ -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; \
......
{
"driver": "nvme",
"device": "0000:01:00.0",
"namespace": 1
}
{
"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"
}
<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>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册