Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
...=> encrypted-disk-usage.x86_64-4.1.0.args} | 11 ++--
.../encrypted-disk-usage.x86_64-latest.args | 37 +++++++++++++
....args => encrypted-disk.x86_64-4.1.0.args} | 11 ++--
.../encrypted-disk.x86_64-latest.args | 37 +++++++++++++
...rr => luks-disk-invalid.x86_64-latest.err} | 0
... luks-disks-source-both.x86_64-latest.err} | 0
...gs => luks-disks-source.x86_64-4.1.0.args} | 17 +++---
.../luks-disks-source.x86_64-latest.args | 54 +++++++++++++++++++
...isks.args => luks-disks.x86_64-4.1.0.args} | 11 ++--
.../luks-disks.x86_64-latest.args | 41 ++++++++++++++
tests/qemuxml2argvtest.c | 17 +++---
11 files changed, 206 insertions(+), 30 deletions(-)
rename tests/qemuxml2argvdata/{encrypted-disk-usage.args =>
encrypted-disk-usage.x86_64-4.1.0.args} (74%)
create mode 100644 tests/qemuxml2argvdata/encrypted-disk-usage.x86_64-latest.args
rename tests/qemuxml2argvdata/{encrypted-disk.args =>
encrypted-disk.x86_64-4.1.0.args} (74%)
create mode 100644 tests/qemuxml2argvdata/encrypted-disk.x86_64-latest.args
rename tests/qemuxml2argvdata/{luks-disk-invalid.err =>
luks-disk-invalid.x86_64-latest.err} (100%)
rename tests/qemuxml2argvdata/{luks-disks-source-both.err =>
luks-disks-source-both.x86_64-latest.err} (100%)
rename tests/qemuxml2argvdata/{luks-disks-source.args =>
luks-disks-source.x86_64-4.1.0.args} (80%)
create mode 100644 tests/qemuxml2argvdata/luks-disks-source.x86_64-latest.args
rename tests/qemuxml2argvdata/{luks-disks.args => luks-disks.x86_64-4.1.0.args} (77%)
create mode 100644 tests/qemuxml2argvdata/luks-disks.x86_64-latest.args
diff --git a/tests/qemuxml2argvdata/encrypted-disk-usage.args
b/tests/qemuxml2argvdata/encrypted-disk-usage.x86_64-4.1.0.args
similarity index 74%
rename from tests/qemuxml2argvdata/encrypted-disk-usage.args
rename to tests/qemuxml2argvdata/encrypted-disk-usage.x86_64-4.1.0.args
index 7e28fe8d2b..d93ee8bdcc 100644
--- a/tests/qemuxml2argvdata/encrypted-disk-usage.args
+++ b/tests/qemuxml2argvdata/encrypted-disk-usage.x86_64-4.1.0.args
@@ -11,23 +11,24 @@ QEMU_AUDIO_DRV=none \
-name guest=encryptdisk,debug-threads=on \
-S \
-object
secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-encryptdisk/master-key.aes \
--machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-machine pc-i440fx-4.1,accel=tcg,usb=off,dump-guest-core=off \
-m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 \
-display none \
-no-user-config \
-nodefaults \
--chardev
socket,id=charmonitor,path=/tmp/lib/domain--1-encryptdisk/monitor.sock,server=on,wait=off
\
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-no-acpi \
-boot strict=on \
--usb \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-object
secret,id=virtio-disk0-encryption-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64
\
-drive
file=/storage/guest_disks/encryptdisk,encrypt.format=luks,encrypt.key-secret=virtio-disk0-encryption-secret0,format=qcow2,if=none,id=drive-virtio-disk0
\
--device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
+-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
\
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/encrypted-disk-usage.x86_64-latest.args
b/tests/qemuxml2argvdata/encrypted-disk-usage.x86_64-latest.args
new file mode 100644
index 0000000000..943b442478
--- /dev/null
+++ b/tests/qemuxml2argvdata/encrypted-disk-usage.x86_64-latest.args
@@ -0,0 +1,37 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-encryptdisk \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-encryptdisk/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-encryptdisk/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-encryptdisk/.config \
+/usr/bin/qemu-system-i386 \
+-name guest=encryptdisk,debug-threads=on \
+-S \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-encryptdisk/master-key.aes"}'
\
+-machine pc,accel=tcg,usb=off,dump-guest-core=off,memory-backend=pc.ram \
+-cpu qemu64 \
+-m 1024 \
+-object
'{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}'
\
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-object
'{"qom-type":"secret","id":"libvirt-1-format-encryption-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}'
\
+-blockdev
'{"driver":"file","filename":"/storage/guest_disks/encryptdisk","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","encrypt":{"format":"luks","key-secret":"libvirt-1-format-encryption-secret0"},"file":"libvirt-1-storage"}'
\
+-device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \
+-audiodev id=audio1,driver=none \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/encrypted-disk.args
b/tests/qemuxml2argvdata/encrypted-disk.x86_64-4.1.0.args
similarity index 74%
rename from tests/qemuxml2argvdata/encrypted-disk.args
rename to tests/qemuxml2argvdata/encrypted-disk.x86_64-4.1.0.args
index c850f3afaf..d4e33f3084 100644
--- a/tests/qemuxml2argvdata/encrypted-disk.args
+++ b/tests/qemuxml2argvdata/encrypted-disk.x86_64-4.1.0.args
@@ -11,23 +11,24 @@ QEMU_AUDIO_DRV=none \
-name guest=encryptdisk,debug-threads=on \
-S \
-object
secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-encryptdisk/master-key.aes \
--machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-machine pc-i440fx-4.1,accel=tcg,usb=off,dump-guest-core=off \
-m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 \
-display none \
-no-user-config \
-nodefaults \
--chardev
socket,id=charmonitor,path=/tmp/lib/domain--1-encryptdisk/monitor.sock,server=on,wait=off
\
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-no-acpi \
-boot strict=on \
--usb \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-object
secret,id=virtio-disk0-encryption-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64
\
-drive
file=/storage/guest_disks/encryptdisk,encrypt.format=luks,encrypt.key-secret=virtio-disk0-encryption-secret0,format=qcow2,if=none,id=drive-virtio-disk0
\
--device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
+-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
\
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/encrypted-disk.x86_64-latest.args
b/tests/qemuxml2argvdata/encrypted-disk.x86_64-latest.args
new file mode 100644
index 0000000000..901ea75a00
--- /dev/null
+++ b/tests/qemuxml2argvdata/encrypted-disk.x86_64-latest.args
@@ -0,0 +1,37 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-encryptdisk \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-encryptdisk/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-encryptdisk/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-encryptdisk/.config \
+/usr/bin/qemu-system-i386 \
+-name guest=encryptdisk,debug-threads=on \
+-S \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-encryptdisk/master-key.aes"}'
\
+-machine pc,accel=tcg,usb=off,dump-guest-core=off,memory-backend=pc.ram \
+-cpu qemu64 \
+-m 1024 \
+-object
'{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}'
\
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-object
'{"qom-type":"secret","id":"libvirt-1-format-encryption-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}'
\
+-blockdev
'{"driver":"file","filename":"/storage/guest_disks/encryptdisk","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","encrypt":{"format":"luks","key-secret":"libvirt-1-format-encryption-secret0"},"file":"libvirt-1-storage"}'
\
+-device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \
+-audiodev id=audio1,driver=none \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/luks-disk-invalid.err
b/tests/qemuxml2argvdata/luks-disk-invalid.x86_64-latest.err
similarity index 100%
rename from tests/qemuxml2argvdata/luks-disk-invalid.err
rename to tests/qemuxml2argvdata/luks-disk-invalid.x86_64-latest.err
diff --git a/tests/qemuxml2argvdata/luks-disks-source-both.err
b/tests/qemuxml2argvdata/luks-disks-source-both.x86_64-latest.err
similarity index 100%
rename from tests/qemuxml2argvdata/luks-disks-source-both.err
rename to tests/qemuxml2argvdata/luks-disks-source-both.x86_64-latest.err
diff --git a/tests/qemuxml2argvdata/luks-disks-source.args
b/tests/qemuxml2argvdata/luks-disks-source.x86_64-4.1.0.args
similarity index 80%
rename from tests/qemuxml2argvdata/luks-disks-source.args
rename to tests/qemuxml2argvdata/luks-disks-source.x86_64-4.1.0.args
index 4d056da220..fa5cf48bae 100644
--- a/tests/qemuxml2argvdata/luks-disks-source.args
+++ b/tests/qemuxml2argvdata/luks-disks-source.x86_64-4.1.0.args
@@ -13,34 +13,35 @@ QEMU_AUDIO_DRV=none \
-object
secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-encryptdisk/master-key.aes \
-machine pc-i440fx-2.1,accel=tcg,usb=off,dump-guest-core=off \
-m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 \
-display none \
-no-user-config \
-nodefaults \
--chardev
socket,id=charmonitor,path=/tmp/lib/domain--1-encryptdisk/monitor.sock,server=on,wait=off
\
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-no-acpi \
-boot strict=on \
--usb \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-object
secret,id=virtio-disk0-encryption-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64
\
-drive
file=/storage/guest_disks/encryptdisk,key-secret=virtio-disk0-encryption-secret0,format=luks,if=none,id=drive-virtio-disk0
\
--device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
+-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
\
-object
secret,id=virtio-disk1-encryption-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64
\
-drive
file=/storage/guest_disks/encryptdisk2,key-secret=virtio-disk1-encryption-secret0,format=luks,if=none,id=drive-virtio-disk1
\
--device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 \
+-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 \
-object
secret,id=virtio-disk2-auth-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64
\
-object
secret,id=virtio-disk2-encryption-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64
\
-drive
file.driver=iscsi,file.portal=example.org:6000,file.target=iqn.1992-01.com.example:storage,file.lun=1,file.transport=tcp,file.user=myname,file.password-secret=virtio-disk2-auth-secret0,key-secret=virtio-disk2-encryption-secret0,format=luks,if=none,id=drive-virtio-disk2
\
--device virtio-blk-pci,bus=pci.0,addr=0x2,drive=drive-virtio-disk2,id=virtio-disk2 \
+-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=drive-virtio-disk2,id=virtio-disk2 \
-object
secret,id=virtio-disk3-encryption-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64
\
-drive
file.driver=iscsi,file.portal=iscsi.example.com:3260,file.target=demo-target,file.lun=3,file.transport=tcp,key-secret=virtio-disk3-encryption-secret0,format=luks,if=none,id=drive-virtio-disk3
\
--device virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk3,id=virtio-disk3 \
+-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk3,id=virtio-disk3 \
-object
secret,id=virtio-disk4-encryption-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64
\
-drive
'file=rbd:pool/image:auth_supported=none:mon_host=mon1.example.org\:6321\;mon2.example.org\:6322\;mon3.example.org\:6322,key-secret=virtio-disk4-encryption-secret0,format=luks,if=none,id=drive-virtio-disk4'
\
--device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-virtio-disk4,id=virtio-disk4 \
+-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk4,id=virtio-disk4 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/luks-disks-source.x86_64-latest.args
b/tests/qemuxml2argvdata/luks-disks-source.x86_64-latest.args
new file mode 100644
index 0000000000..67ecf0ea95
--- /dev/null
+++ b/tests/qemuxml2argvdata/luks-disks-source.x86_64-latest.args
@@ -0,0 +1,54 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-encryptdisk \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-encryptdisk/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-encryptdisk/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-encryptdisk/.config \
+/usr/bin/qemu-system-x86_64 \
+-name guest=encryptdisk,debug-threads=on \
+-S \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-encryptdisk/master-key.aes"}'
\
+-machine pc-i440fx-2.1,accel=tcg,usb=off,dump-guest-core=off,memory-backend=pc.ram \
+-cpu qemu64 \
+-m 1024 \
+-object
'{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}'
\
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-object
'{"qom-type":"secret","id":"libvirt-5-format-encryption-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}'
\
+-blockdev
'{"driver":"file","filename":"/storage/guest_disks/encryptdisk","node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-5-format","read-only":false,"driver":"luks","key-secret":"libvirt-5-format-encryption-secret0","file":"libvirt-5-storage"}'
\
+-device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=libvirt-5-format,id=virtio-disk0,bootindex=1 \
+-object
'{"qom-type":"secret","id":"libvirt-4-format-encryption-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}'
\
+-blockdev
'{"driver":"file","filename":"/storage/guest_disks/encryptdisk2","node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-4-format","read-only":false,"driver":"luks","key-secret":"libvirt-4-format-encryption-secret0","file":"libvirt-4-storage"}'
\
+-device virtio-blk-pci,bus=pci.0,addr=0x5,drive=libvirt-4-format,id=virtio-disk1 \
+-object
'{"qom-type":"secret","id":"libvirt-3-storage-auth-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}'
\
+-object
'{"qom-type":"secret","id":"libvirt-3-format-encryption-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}'
\
+-blockdev
'{"driver":"iscsi","portal":"example.org:6000","target":"iqn.1992-01.com.example:storage","lun":1,"transport":"tcp","user":"myname","password-secret":"libvirt-3-storage-auth-secret0","node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-3-format","read-only":false,"driver":"luks","key-secret":"libvirt-3-format-encryption-secret0","file":"libvirt-3-storage"}'
\
+-device virtio-blk-pci,bus=pci.0,addr=0x2,drive=libvirt-3-format,id=virtio-disk2 \
+-object
'{"qom-type":"secret","id":"libvirt-2-format-encryption-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}'
\
+-blockdev
'{"driver":"iscsi","portal":"iscsi.example.com:3260","target":"demo-target","lun":3,"transport":"tcp","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-2-format","read-only":false,"driver":"luks","key-secret":"libvirt-2-format-encryption-secret0","file":"libvirt-2-storage"}'
\
+-device virtio-blk-pci,bus=pci.0,addr=0x6,drive=libvirt-2-format,id=virtio-disk3 \
+-object
'{"qom-type":"secret","id":"libvirt-1-format-encryption-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}'
\
+-blockdev
'{"driver":"rbd","pool":"pool","image":"image","server":[{"host":"mon1.example.org","port":"6321"},{"host":"mon2.example.org","port":"6322"},{"host":"mon3.example.org","port":"6322"}],"node-name":"libvirt-1-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-storage"}'
\
+-device virtio-blk-pci,bus=pci.0,addr=0x7,drive=libvirt-1-format,id=virtio-disk4 \
+-audiodev id=audio1,driver=none \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/luks-disks.args
b/tests/qemuxml2argvdata/luks-disks.x86_64-4.1.0.args
similarity index 77%
rename from tests/qemuxml2argvdata/luks-disks.args
rename to tests/qemuxml2argvdata/luks-disks.x86_64-4.1.0.args
index 1cd04329e6..bf0eee7cae 100644
--- a/tests/qemuxml2argvdata/luks-disks.args
+++ b/tests/qemuxml2argvdata/luks-disks.x86_64-4.1.0.args
@@ -13,24 +13,25 @@ QEMU_AUDIO_DRV=none \
-object
secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-encryptdisk/master-key.aes \
-machine pc-i440fx-2.1,accel=tcg,usb=off,dump-guest-core=off \
-m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 \
-display none \
-no-user-config \
-nodefaults \
--chardev
socket,id=charmonitor,path=/tmp/lib/domain--1-encryptdisk/monitor.sock,server=on,wait=off
\
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-no-acpi \
-boot strict=on \
--usb \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-object
secret,id=virtio-disk0-encryption-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64
\
-drive
file=/storage/guest_disks/encryptdisk,key-secret=virtio-disk0-encryption-secret0,format=luks,if=none,id=drive-virtio-disk0
\
--device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
+-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
\
-object
secret,id=virtio-disk1-encryption-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64
\
-drive
file=/storage/guest_disks/encryptdisk2,key-secret=virtio-disk1-encryption-secret0,format=luks,if=none,id=drive-virtio-disk1
\
--device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 \
+-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/luks-disks.x86_64-latest.args
b/tests/qemuxml2argvdata/luks-disks.x86_64-latest.args
new file mode 100644
index 0000000000..c9db60c736
--- /dev/null
+++ b/tests/qemuxml2argvdata/luks-disks.x86_64-latest.args
@@ -0,0 +1,41 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-encryptdisk \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-encryptdisk/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-encryptdisk/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-encryptdisk/.config \
+/usr/bin/qemu-system-x86_64 \
+-name guest=encryptdisk,debug-threads=on \
+-S \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-encryptdisk/master-key.aes"}'
\
+-machine pc-i440fx-2.1,accel=tcg,usb=off,dump-guest-core=off,memory-backend=pc.ram \
+-cpu qemu64 \
+-m 1024 \
+-object
'{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}'
\
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-object
'{"qom-type":"secret","id":"libvirt-2-format-encryption-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}'
\
+-blockdev
'{"driver":"file","filename":"/storage/guest_disks/encryptdisk","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-2-format","read-only":false,"driver":"luks","key-secret":"libvirt-2-format-encryption-secret0","file":"libvirt-2-storage"}'
\
+-device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=libvirt-2-format,id=virtio-disk0,bootindex=1 \
+-object
'{"qom-type":"secret","id":"libvirt-1-format-encryption-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}'
\
+-blockdev
'{"driver":"file","filename":"/storage/guest_disks/encryptdisk2","node-name":"libvirt-1-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-storage"}'
\
+-device virtio-blk-pci,bus=pci.0,addr=0x5,drive=libvirt-1-format,id=virtio-disk1 \
+-audiodev id=audio1,driver=none \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index fa58c7d0ef..39de7656e7 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1450,15 +1450,18 @@ mymain(void)
DO_TEST_CAPS_ARCH_VER("disk-arm-virtio-sd", "aarch64",
"4.0.0");
DO_TEST_CAPS_ARCH_LATEST("disk-arm-virtio-sd", "aarch64");
- DO_TEST("encrypted-disk", QEMU_CAPS_QCOW2_LUKS);
- DO_TEST("encrypted-disk-usage", QEMU_CAPS_QCOW2_LUKS);
- DO_TEST_NOCAPS("luks-disks");
- DO_TEST_NOCAPS("luks-disks-source");
- DO_TEST("luks-disks-source-qcow2", QEMU_CAPS_QCOW2_LUKS);
+ DO_TEST_CAPS_VER("encrypted-disk", "4.1.0");
+ DO_TEST_CAPS_LATEST("encrypted-disk");
+ DO_TEST_CAPS_VER("encrypted-disk-usage", "4.1.0");
+ DO_TEST_CAPS_LATEST("encrypted-disk-usage");
+ DO_TEST_CAPS_VER("luks-disks", "4.1.0");
+ DO_TEST_CAPS_LATEST("luks-disks");
+ DO_TEST_CAPS_VER("luks-disks-source", "4.1.0");
+ DO_TEST_CAPS_LATEST("luks-disks-source");
DO_TEST_CAPS_VER("luks-disks-source-qcow2", "5.2.0");
DO_TEST_CAPS_LATEST("luks-disks-source-qcow2");
- DO_TEST_PARSE_ERROR_NOCAPS("luks-disk-invalid");
- DO_TEST_PARSE_ERROR_NOCAPS("luks-disks-source-both");
+ DO_TEST_CAPS_LATEST_PARSE_ERROR("luks-disk-invalid");
+ DO_TEST_CAPS_LATEST_PARSE_ERROR("luks-disks-source-both");
DO_TEST_NOCAPS("disk-ide-split");
DO_TEST("disk-ide-wwn",
--
2.31.1