mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
tests: qemuxml2argv: Add CAPS_LATEST version of security-related tests
'disk-network-source-auth' and 'disk-network-tlsx509' Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
ca19bb378f
commit
9c9d697a5c
@ -0,0 +1,47 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu-system-i686 \
|
||||
-name guest=QEMUGuest1,debug-threads=on \
|
||||
-S \
|
||||
-object secret,id=masterKey0,format=raw,\
|
||||
file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
|
||||
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
|
||||
-m 214 \
|
||||
-realtime mlock=off \
|
||||
-smp 1,sockets=1,cores=1,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
-nodefaults \
|
||||
-chardev socket,id=charmonitor,fd=1729,server,nowait \
|
||||
-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 secret,id=virtio-disk0-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-disk0-secret0,format=raw,if=none,\
|
||||
id=drive-virtio-disk0 \
|
||||
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,\
|
||||
id=virtio-disk0,bootindex=1 \
|
||||
-object secret,id=virtio-disk1-secret0,\
|
||||
data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
|
||||
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
|
||||
-drive 'file=rbd:pool/image:id=myname:auth_supported=cephx\;none:\
|
||||
mon_host=mon1.example.org\:6321\;mon2.example.org\:6322\;mon3.example.org\:\
|
||||
6322,file.password-secret=virtio-disk1-secret0,format=raw,if=none,\
|
||||
id=drive-virtio-disk1' \
|
||||
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk1,\
|
||||
id=virtio-disk1 \
|
||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
|
||||
resourcecontrol=deny \
|
||||
-msg timestamp=on
|
@ -0,0 +1,59 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu-system-x86_64 \
|
||||
-name guest=QEMUGuest1,debug-threads=on \
|
||||
-S \
|
||||
-object secret,id=masterKey0,format=raw,\
|
||||
file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
|
||||
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
|
||||
-cpu qemu32 \
|
||||
-m 214 \
|
||||
-realtime mlock=off \
|
||||
-smp 1,sockets=1,cores=1,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
-nodefaults \
|
||||
-chardev socket,id=charmonitor,fd=1729,server,nowait \
|
||||
-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 tls-creds-x509,id=objvirtio-disk0_tls0,dir=/etc/pki/libvirt-vxhs/dummy,\
|
||||
,path,endpoint=client,verify-peer=yes \
|
||||
-drive file.driver=vxhs,file.tls-creds=objvirtio-disk0_tls0,\
|
||||
file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc251,\
|
||||
file.server.host=192.168.0.1,file.server.port=9999,format=raw,if=none,\
|
||||
id=drive-virtio-disk0,cache=none \
|
||||
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
|
||||
id=virtio-disk0,bootindex=1,write-cache=on,\
|
||||
serial=eb90327c-8302-4725-9e1b-4e85ed4dc251 \
|
||||
-object tls-creds-x509,id=objvirtio-disk1_tls0,dir=/etc/pki/libvirt-vxhs/dummy,\
|
||||
,path,endpoint=client,verify-peer=yes \
|
||||
-drive file.driver=vxhs,file.tls-creds=objvirtio-disk1_tls0,\
|
||||
file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc252,\
|
||||
file.server.host=192.168.0.2,file.server.port=9999,format=raw,if=none,\
|
||||
id=drive-virtio-disk1,cache=none \
|
||||
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,\
|
||||
id=virtio-disk1,write-cache=on,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252 \
|
||||
-drive file.driver=vxhs,file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc253,\
|
||||
file.server.host=192.168.0.3,file.server.port=9999,format=raw,if=none,\
|
||||
id=drive-virtio-disk2,cache=none \
|
||||
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk2,\
|
||||
id=virtio-disk2,write-cache=on,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252 \
|
||||
-object tls-creds-x509,id=objvirtio-disk3_tls0,dir=/etc/pki/libvirt-nbd/dummy,,\
|
||||
path,endpoint=client,verify-peer=yes \
|
||||
-drive file.driver=nbd,file.server.type=inet,file.server.host=example.com,\
|
||||
file.server.port=1234,file.tls-creds=objvirtio-disk3_tls0,format=raw,if=none,\
|
||||
id=drive-virtio-disk3,cache=none \
|
||||
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk3,\
|
||||
id=virtio-disk3,write-cache=on \
|
||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
|
||||
resourcecontrol=deny \
|
||||
-msg timestamp=on
|
@ -1055,10 +1055,12 @@ mymain(void)
|
||||
DO_TEST("disk-network-sheepdog", NONE);
|
||||
DO_TEST_CAPS_LATEST("disk-network-sheepdog");
|
||||
DO_TEST("disk-network-source-auth", NONE);
|
||||
DO_TEST_CAPS_LATEST("disk-network-source-auth");
|
||||
DO_TEST("disk-network-vxhs", QEMU_CAPS_VXHS);
|
||||
driver.config->vxhsTLS = 1;
|
||||
DO_TEST("disk-network-tlsx509", QEMU_CAPS_VXHS,
|
||||
QEMU_CAPS_OBJECT_TLS_CREDS_X509, QEMU_CAPS_NBD_TLS);
|
||||
DO_TEST_CAPS_LATEST("disk-network-tlsx509");
|
||||
driver.config->vxhsTLS = 0;
|
||||
VIR_FREE(driver.config->vxhsTLSx509certdir);
|
||||
DO_TEST("disk-no-boot",
|
||||
|
Loading…
x
Reference in New Issue
Block a user