Test slices on top of nvme-backed disks.
Note that the changes in seemingly irrelevant parts of the output are
due to re-naming the nodenames.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
.../disk-slices.x86_64-latest.args | 63 ++++++++++++-------
tests/qemuxml2argvdata/disk-slices.xml | 25 ++++++++
.../disk-slices.x86_64-latest.xml | 25 ++++++++
3 files changed, 92 insertions(+), 21 deletions(-)
diff --git a/tests/qemuxml2argvdata/disk-slices.x86_64-latest.args
b/tests/qemuxml2argvdata/disk-slices.x86_64-latest.args
index c4e1384f4d..a24b3395e2 100644
--- a/tests/qemuxml2argvdata/disk-slices.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-slices.x86_64-latest.args
@@ -30,37 +30,58 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-blockdev
'{"driver":"file","filename":"/var/lib/libvirt/images/raw.img",\
-"node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}'
\
--blockdev
'{"node-name":"libvirt-4-format","read-only":false,"driver":"raw",\
-"offset":1234,"size":321,"file":"libvirt-4-storage"}'
\
--device virtio-blk-pci,bus=pci.0,addr=0x2,drive=libvirt-4-format,\
+"node-name":"libvirt-6-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-6-format","read-only":false,"driver":"raw",\
+"offset":1234,"size":321,"file":"libvirt-6-storage"}'
\
+-device virtio-blk-pci,bus=pci.0,addr=0x2,drive=libvirt-6-format,\
id=virtio-disk0,bootindex=1 \
-blockdev
'{"driver":"file","filename":"/var/lib/libvirt/images/raw.img",\
-"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}'
\
--blockdev
'{"driver":"raw","node-name":"libvirt-3-slice-sto","offset":9876,\
-"size":123456789,"file":"libvirt-3-storage","auto-read-only":true,\
+"node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"driver":"raw","node-name":"libvirt-5-slice-sto","offset":9876,\
+"size":123456789,"file":"libvirt-5-storage","auto-read-only":true,\
"discard":"unmap"}' \
--blockdev
'{"node-name":"libvirt-3-format","read-only":true,"driver":"qcow2",\
-"file":"libvirt-3-slice-sto","backing":null}' \
+-blockdev
'{"node-name":"libvirt-5-format","read-only":true,"driver":"qcow2",\
+"file":"libvirt-5-slice-sto","backing":null}' \
-blockdev
'{"driver":"file","filename":"/var/lib/libvirt/images/overlay.qcow2",\
-"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}'
\
--blockdev
'{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2",\
-"file":"libvirt-2-storage","backing":"libvirt-3-format"}'
\
--device virtio-blk-pci,bus=pci.0,addr=0x3,drive=libvirt-2-format,\
+"node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-4-format","read-only":false,"driver":"qcow2",\
+"file":"libvirt-4-storage","backing":"libvirt-5-format"}'
\
+-device virtio-blk-pci,bus=pci.0,addr=0x3,drive=libvirt-4-format,\
id=virtio-disk1 \
--object secret,id=libvirt-1-format-encryption-secret0,\
+-object secret,id=libvirt-3-format-encryption-secret0,\
data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
-blockdev
'{"driver":"file","filename":"/var/lib/libvirt/images/luks.img",\
-"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}'
\
--blockdev
'{"driver":"raw","node-name":"libvirt-1-slice-sto","offset":1234,\
-"size":321,"file":"libvirt-1-storage","auto-read-only":true,\
+"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"driver":"raw","node-name":"libvirt-3-slice-sto","offset":1234,\
+"size":321,"file":"libvirt-3-storage","auto-read-only":true,\
"discard":"unmap"}' \
--blockdev
'{"node-name":"libvirt-1-format","read-only":false,"driver":"luks",\
-"key-secret":"libvirt-1-format-encryption-secret0",\
-"file":"libvirt-1-slice-sto"}' \
--device virtio-blk-pci,bus=pci.0,addr=0x4,drive=libvirt-1-format,\
+-blockdev
'{"node-name":"libvirt-3-format","read-only":false,"driver":"luks",\
+"key-secret":"libvirt-3-format-encryption-secret0",\
+"file":"libvirt-3-slice-sto"}' \
+-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=libvirt-3-format,\
id=virtio-disk2 \
+-blockdev
'{"driver":"nvme","device":"0000:02:00.0","namespace":1,\
+"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-2-format","read-only":false,"driver":"raw",\
+"offset":1234,"size":321,"file":"libvirt-2-storage"}'
\
+-device virtio-blk-pci,bus=pci.0,addr=0x6,drive=libvirt-2-format,\
+id=virtio-disk3 \
+-object secret,id=libvirt-1-format-encryption-secret0,\
+data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
+keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
+-blockdev
'{"driver":"nvme","device":"0001:02:00.0","namespace":2,\
+"node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev
'{"driver":"raw","node-name":"libvirt-1-slice-sto","offset":1234,\
+"size":321,"file":"libvirt-1-storage","auto-read-only":true,"discard":"unmap",\
+"cache":{"direct":true,"no-flush":false}}' \
+-blockdev
'{"node-name":"libvirt-1-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"encrypt":{"format":"luks","key-secret":"libvirt-1-format-encryption-secret0"},\
+"file":"libvirt-1-slice-sto"}' \
+-device virtio-blk-pci,bus=pci.0,addr=0x7,drive=libvirt-1-format,\
+id=virtio-disk4,write-cache=on \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/disk-slices.xml
b/tests/qemuxml2argvdata/disk-slices.xml
index 5c6f29d154..1675766a46 100644
--- a/tests/qemuxml2argvdata/disk-slices.xml
+++ b/tests/qemuxml2argvdata/disk-slices.xml
@@ -51,6 +51,31 @@
<backingStore/>
<target dev='vdc' bus='virtio'/>
</disk>
+ <disk type='nvme' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source type='pci' managed='no' namespace='1'>
+ <address domain='0x0000' bus='0x02' slot='0x00'
function='0x0'/>
+ <slices>
+ <slice type='storage' offset='1234' size='321'/>
+ </slices>
+ </source>
+ <target dev='vdd' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x06' function='0x0'/>
+ </disk>
+ <disk type='nvme' device='disk'>
+ <driver name='qemu' type='qcow2' cache='none'/>
+ <source type='pci' managed='no' namespace='2'>
+ <address domain='0x0001' bus='0x02' slot='0x00'
function='0x0'/>
+ <slices>
+ <slice type='storage' offset='1234' size='321'/>
+ </slices>
+ <encryption format='luks'>
+ <secret type='passphrase'
uuid='0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f'/>
+ </encryption>
+ </source>
+ <target dev='vde' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x07' function='0x0'/>
+ </disk>
<controller type='usb'/>
<controller type='pci' model='pci-root'/>
<memballoon model='virtio'/>
diff --git a/tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml
index 4f4abcda1f..a02820a104 100644
--- a/tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml
@@ -57,6 +57,31 @@
<target dev='vdc' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x04' function='0x0'/>
</disk>
+ <disk type='nvme' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source type='pci' managed='no' namespace='1'>
+ <address domain='0x0000' bus='0x02' slot='0x00'
function='0x0'/>
+ <slices>
+ <slice type='storage' offset='1234' size='321'/>
+ </slices>
+ </source>
+ <target dev='vdd' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x06' function='0x0'/>
+ </disk>
+ <disk type='nvme' device='disk'>
+ <driver name='qemu' type='qcow2' cache='none'/>
+ <source type='pci' managed='no' namespace='2'>
+ <address domain='0x0001' bus='0x02' slot='0x00'
function='0x0'/>
+ <slices>
+ <slice type='storage' offset='1234' size='321'/>
+ </slices>
+ <encryption format='luks'>
+ <secret type='passphrase'
uuid='0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f'/>
+ </encryption>
+ </source>
+ <target dev='vde' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x07' function='0x0'/>
+ </disk>
<controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
</controller>
--
2.28.0