[PATCH 00/12] qemuxml2*test: Improve testing of SCSI hostdevs

Switch to qemu caps based testing to validate pre and post blockdev configs. This is split out from my unfinished series for switching hostdevs to blockdev. Peter Krempa (12): qemuxml2argvtest: hostdev-scsi-lsi: Modernize to qemu-4.1 qemuxml2argvtest: hostdev-scsi-lsi: Add qemu-2.8 variant qemuxml2argvtest: hostdev-scsi-lsi: Add "latest" caps version qemuxml2argvtest: hostdev-scsi-lsi: Add test of readonly variant qemuxml2argvtest: hostdev-scsi-lsi: Integrate 'hostdev-scsi-lsi-iscsi' case qemuxml2argvtest: hostdev-scsi-lsi: Integrate 'hostdev-scsi-lsi-iscsi-auth' case qemuxml2argvtest: hostdev-scsi-virtio-scsi: Modernize to qemu-4.1 qemuxml2argvtest: hostdev-scsi-virtio-scsi: Add "latest" caps version qemuxml2argvtest: hostdev-scsi-virtio-scsi: Add qemu-2.8 variant qemuxml2argvtest: hostdev-scsi-virtio-scsi: Integrate 'hostdev-scsi-readonly' qemuxml2argvtest: hostdev-scsi-virtio-scsi: Integrate 'hostdev-scsi-virtio-iscsi' case qemuxml2argvtest: hostdev-scsi-virtio-scsi: Integrate iSCSI authentication cases ...sk-hostdev-scsi-virtio-iscsi-auth-AES.args | 49 ------------ ...isk-hostdev-scsi-virtio-iscsi-auth-AES.xml | 43 ----------- .../hostdev-scsi-lsi-iscsi-auth.args | 37 ---------- .../hostdev-scsi-lsi-iscsi-auth.xml | 48 ------------ .../hostdev-scsi-lsi-iscsi.args | 37 ---------- .../hostdev-scsi-lsi-iscsi.xml | 42 ----------- tests/qemuxml2argvdata/hostdev-scsi-lsi.args | 33 --------- .../hostdev-scsi-lsi.x86_64-2.8.0.args | 51 +++++++++++++ .../hostdev-scsi-lsi.x86_64-4.1.0.args | 64 ++++++++++++++++ .../hostdev-scsi-lsi.x86_64-latest.args | 68 +++++++++++++++++ tests/qemuxml2argvdata/hostdev-scsi-lsi.xml | 38 ++++++++++ .../hostdev-scsi-readonly.args | 34 --------- .../hostdev-scsi-readonly.xml | 38 ---------- .../hostdev-scsi-virtio-iscsi-auth.xml | 48 ------------ .../hostdev-scsi-virtio-iscsi.args | 39 ---------- .../hostdev-scsi-virtio-iscsi.xml | 42 ----------- .../hostdev-scsi-virtio-scsi.args | 34 --------- ...ostdev-scsi-virtio-scsi.x86_64-2.8.0.args} | 40 +++++++--- ...hostdev-scsi-virtio-scsi.x86_64-4.1.0.args | 70 ++++++++++++++++++ ...ostdev-scsi-virtio-scsi.x86_64-latest.args | 74 +++++++++++++++++++ .../hostdev-scsi-virtio-scsi.xml | 38 ++++++++++ tests/qemuxml2argvtest.c | 36 ++------- .../hostdev-scsi-lsi-iscsi-auth.xml | 57 -------------- .../hostdev-scsi-lsi-iscsi.xml | 51 ------------- tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml | 38 ++++++++++ .../hostdev-scsi-readonly.xml | 47 ------------ .../hostdev-scsi-virtio-iscsi-auth.xml | 57 -------------- .../hostdev-scsi-virtio-iscsi.xml | 51 ------------- .../hostdev-scsi-virtio-scsi.xml | 38 ++++++++++ tests/qemuxml2xmltest.c | 16 ---- 30 files changed, 515 insertions(+), 843 deletions(-) delete mode 100644 tests/qemuxml2argvdata/disk-hostdev-scsi-virtio-iscsi-auth-AES.args delete mode 100644 tests/qemuxml2argvdata/disk-hostdev-scsi-virtio-iscsi-auth-AES.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi-auth.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi-auth.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-readonly.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-readonly.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi-auth.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.args rename tests/qemuxml2argvdata/{hostdev-scsi-virtio-iscsi-auth.args => hostdev-scsi-virtio-scsi.x86_64-2.8.0.args} (52%) create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-lsi-iscsi-auth.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-lsi-iscsi.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-readonly.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-virtio-iscsi-auth.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-virtio-iscsi.xml -- 2.26.2

Modernize the current state to the pre-blockdev version of qemu to minimize changes. Later patch will add a 'latest' case too. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...rgs => hostdev-scsi-lsi.x86_64-4.1.0.args} | 21 ++++++++++++------- tests/qemuxml2argvtest.c | 5 ++--- 2 files changed, 15 insertions(+), 11 deletions(-) rename tests/qemuxml2argvdata/{hostdev-scsi-lsi.args => hostdev-scsi-lsi.x86_64-4.1.0.args} (59%) diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args similarity index 59% rename from tests/qemuxml2argvdata/hostdev-scsi-lsi.args rename to tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args index cf90224e9ad..54fbf3a8472 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args @@ -8,26 +8,31 @@ XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest2/.cache \ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ QEMU_AUDIO_DRV=none \ /usr/bin/qemu-system-i386 \ --name QEMUGuest2 \ +-name guest=QEMUGuest2,debug-threads=on \ -S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ +-machine pc-i440fx-4.1,accel=tcg,usb=off,dump-guest-core=off \ -m 214 \ --realtime mlock=off \ +-overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid c7a5fdbd-edaf-9466-926a-d65c16db1809 \ -display none \ -no-user-config \ -nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest2/monitor.sock,\ -server,nowait \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ -no-shutdown \ -no-acpi \ --device lsi,id=scsi0,bus=pci.0,addr=0x3 \ --usb \ +-boot strict=on \ +-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ +-device lsi,id=scsi0,bus=pci.0,addr=0x2 \ -drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \ -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \ -device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 +-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 d5b2a21b5a7..9c0fd27b8db 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2656,9 +2656,8 @@ mymain(void) QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_PXB_PCIE); - DO_TEST("hostdev-scsi-lsi", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); + DO_TEST_CAPS_VER("hostdev-scsi-lsi", "4.1.0"); + DO_TEST("hostdev-scsi-virtio-scsi", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); -- 2.26.2

qemu-2.8 didn't yet support QEMU_CAPS_ISCSI_PASSWORD_SECRET. This version will allow integrating multiple test cases into one. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../hostdev-scsi-lsi.x86_64-2.8.0.args | 37 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 2 files changed, 38 insertions(+) create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args new file mode 100644 index 00000000000..60467c44558 --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args @@ -0,0 +1,37 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest2 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest2/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest2/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-i386 \ +-name guest=QEMUGuest2,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ +-machine pc-i440fx-2.8,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9466-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest2/monitor.sock,\ +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 \ +-device lsi,id=scsi0,bus=pci.0,addr=0x2 \ +-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \ +-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ +-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \ +-device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ +-msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 9c0fd27b8db..610cf6ccc85 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2656,6 +2656,7 @@ mymain(void) QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_PXB_PCIE); + DO_TEST_CAPS_VER("hostdev-scsi-lsi", "2.8.0"); DO_TEST_CAPS_VER("hostdev-scsi-lsi", "4.1.0"); DO_TEST("hostdev-scsi-virtio-scsi", -- 2.26.2

Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../hostdev-scsi-lsi.x86_64-latest.args | 42 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 2 files changed, 43 insertions(+) create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args new file mode 100644 index 00000000000..23223d4cff1 --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args @@ -0,0 +1,42 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest2 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest2/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest2/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-i386 \ +-name guest=QEMUGuest2,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-cpu qemu64 \ +-m 214 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9466-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 \ +-device lsi,id=scsi0,bus=pci.0,addr=0x2 \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2",\ +"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\ +"file":"libvirt-1-storage"}' \ +-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ +-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \ +-device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \ +-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 610cf6ccc85..2880be27271 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2658,6 +2658,7 @@ mymain(void) DO_TEST_CAPS_VER("hostdev-scsi-lsi", "2.8.0"); DO_TEST_CAPS_VER("hostdev-scsi-lsi", "4.1.0"); + DO_TEST_CAPS_LATEST("hostdev-scsi-lsi"); DO_TEST("hostdev-scsi-virtio-scsi", QEMU_CAPS_VIRTIO_SCSI, -- 2.26.2

"hostdev-scsi-readonly" case tests the readonly disk with a virtio-scsi controller. Add it for the 'lsi' controller test as well. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args | 2 ++ tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args | 2 ++ .../qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args | 2 ++ tests/qemuxml2argvdata/hostdev-scsi-lsi.xml | 8 ++++++++ tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml | 8 ++++++++ 5 files changed, 22 insertions(+) diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args index 60467c44558..1808e2a303b 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args @@ -33,5 +33,7 @@ server,nowait \ -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \ -device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \ +-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \ +-device scsi-generic,bus=scsi0.0,scsi-id=6,drive=drive-hostdev1,id=hostdev1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args index 54fbf3a8472..66764f87a1b 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args @@ -32,6 +32,8 @@ file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \ -device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \ +-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \ +-device scsi-generic,bus=scsi0.0,scsi-id=6,drive=drive-hostdev1,id=hostdev1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args index 23223d4cff1..4d42bf2cbf3 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args @@ -36,6 +36,8 @@ file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \ -device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \ +-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \ +-device scsi-generic,bus=scsi0.0,scsi-id=6,drive=drive-hostdev1,id=hostdev1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.xml b/tests/qemuxml2argvdata/hostdev-scsi-lsi.xml index 34c41e3fe61..cc0960e2216 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.xml +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.xml @@ -32,6 +32,14 @@ </source> <address type='drive' controller='0' bus='0' target='0' unit='7'/> </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source> + <adapter name='scsi_host0'/> + <address bus='0' target='0' unit='1'/> + </source> + <readonly/> + <address type='drive' controller='0' bus='0' target='0' unit='6'/> + </hostdev> <memballoon model='virtio'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml index 6fb6979399c..10811844255 100644 --- a/tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml +++ b/tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml @@ -39,6 +39,14 @@ </source> <address type='drive' controller='0' bus='0' target='0' unit='7'/> </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source> + <adapter name='scsi_host0'/> + <address bus='0' target='0' unit='1'/> + </source> + <readonly/> + <address type='drive' controller='0' bus='0' target='0' unit='6'/> + </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </memballoon> -- 2.26.2

We can add the iSCSI hostdevs to the same test file. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../hostdev-scsi-lsi-iscsi.args | 37 -------------- .../hostdev-scsi-lsi-iscsi.xml | 42 --------------- .../hostdev-scsi-lsi.x86_64-2.8.0.args | 6 +++ .../hostdev-scsi-lsi.x86_64-4.1.0.args | 8 +++ .../hostdev-scsi-lsi.x86_64-latest.args | 8 +++ tests/qemuxml2argvdata/hostdev-scsi-lsi.xml | 12 +++++ tests/qemuxml2argvtest.c | 3 -- .../hostdev-scsi-lsi-iscsi.xml | 51 ------------------- tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml | 12 +++++ tests/qemuxml2xmltest.c | 3 -- 10 files changed, 46 insertions(+), 136 deletions(-) delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-lsi-iscsi.xml diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.args deleted file mode 100644 index f215fba0666..00000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.args +++ /dev/null @@ -1,37 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest2 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest2/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest2/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest2 \ --S \ --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-9466-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest2/monitor.sock,\ -server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --device lsi,id=scsi0,bus=pci.0,addr=0x3 \ --usb \ --drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \ --device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ --drive file=iscsi://example.org:3260/iqn.1992-01.com.example/0,if=none,\ -format=raw,id=drive-hostdev0 \ --device scsi-generic,bus=scsi0.0,scsi-id=4,drive=drive-hostdev0,id=hostdev0 \ --drive file=iscsi://example.org:3260/iqn.1992-01.com.example/1,if=none,\ -format=raw,id=drive-hostdev1 \ --device scsi-generic,bus=scsi0.0,scsi-id=5,drive=drive-hostdev1,id=hostdev1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.xml b/tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.xml deleted file mode 100644 index 85885aad8da..00000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.xml +++ /dev/null @@ -1,42 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest2</name> - <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> - <disk type='block' device='disk'> - <source dev='/dev/HostVG/QEMUGuest2'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='scsi' index='0'/> - <controller type='usb' index='0'/> - <controller type='ide' index='0'/> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example'> - <host name='example.org' port='3260'/> - </source> - <address type='drive' controller='0' bus='0' target='0' unit='4'/> - </hostdev> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example/1'> - <host name='example.org' port='3260'/> - </source> - <address type='drive' controller='0' bus='0' target='0' unit='5'/> - </hostdev> - <memballoon model='virtio'/> - </devices> -</domain> diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args index 1808e2a303b..fc02c613875 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args @@ -35,5 +35,11 @@ server,nowait \ -device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \ -device scsi-generic,bus=scsi0.0,scsi-id=6,drive=drive-hostdev1,id=hostdev1 \ +-drive file=iscsi://example.org:3260/iqn.1992-01.com.example/0,if=none,\ +format=raw,id=drive-hostdev2 \ +-device scsi-generic,bus=scsi0.0,scsi-id=4,drive=drive-hostdev2,id=hostdev2 \ +-drive file=iscsi://example.org:3260/iqn.1992-01.com.example/1,if=none,\ +format=raw,id=drive-hostdev3 \ +-device scsi-generic,bus=scsi0.0,scsi-id=5,drive=drive-hostdev3,id=hostdev3 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args index 66764f87a1b..af45fd8cb25 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args @@ -34,6 +34,14 @@ file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ -device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \ -device scsi-generic,bus=scsi0.0,scsi-id=6,drive=drive-hostdev1,id=hostdev1 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example,file.lun=0,file.transport=tcp,if=none,\ +format=raw,id=drive-hostdev2 \ +-device scsi-generic,bus=scsi0.0,scsi-id=4,drive=drive-hostdev2,id=hostdev2 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example,file.lun=1,file.transport=tcp,if=none,\ +format=raw,id=drive-hostdev3 \ +-device scsi-generic,bus=scsi0.0,scsi-id=5,drive=drive-hostdev3,id=hostdev3 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args index 4d42bf2cbf3..32aacd6224e 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args @@ -38,6 +38,14 @@ file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ -device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \ -device scsi-generic,bus=scsi0.0,scsi-id=6,drive=drive-hostdev1,id=hostdev1 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example,file.lun=0,file.transport=tcp,if=none,\ +format=raw,id=drive-hostdev2 \ +-device scsi-generic,bus=scsi0.0,scsi-id=4,drive=drive-hostdev2,id=hostdev2 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example,file.lun=1,file.transport=tcp,if=none,\ +format=raw,id=drive-hostdev3 \ +-device scsi-generic,bus=scsi0.0,scsi-id=5,drive=drive-hostdev3,id=hostdev3 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.xml b/tests/qemuxml2argvdata/hostdev-scsi-lsi.xml index cc0960e2216..671bc20f262 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.xml +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.xml @@ -40,6 +40,18 @@ <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='6'/> </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example'> + <host name='example.org' port='3260'/> + </source> + <address type='drive' controller='0' bus='0' target='0' unit='4'/> + </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example/1'> + <host name='example.org' port='3260'/> + </source> + <address type='drive' controller='0' bus='0' target='0' unit='5'/> + </hostdev> <memballoon model='virtio'/> </devices> </domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2880be27271..c542a7534e8 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2669,9 +2669,6 @@ mymain(void) DO_TEST("hostdev-scsi-virtio-scsi", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); - DO_TEST("hostdev-scsi-lsi-iscsi", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); DO_TEST("hostdev-scsi-lsi-iscsi-auth", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-lsi-iscsi.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-lsi-iscsi.xml deleted file mode 100644 index 463357a20c3..00000000000 --- a/tests/qemuxml2xmloutdata/hostdev-scsi-lsi-iscsi.xml +++ /dev/null @@ -1,51 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest2</name> - <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest2'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='scsi' index='0' model='lsilogic'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </controller> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example/0'> - <host name='example.org' port='3260'/> - </source> - <address type='drive' controller='0' bus='0' target='0' unit='4'/> - </hostdev> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example/1'> - <host name='example.org' port='3260'/> - </source> - <address type='drive' controller='0' bus='0' target='0' unit='5'/> - </hostdev> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml index 10811844255..b314856d8b7 100644 --- a/tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml +++ b/tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml @@ -47,6 +47,18 @@ <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='6'/> </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example/0'> + <host name='example.org' port='3260'/> + </source> + <address type='drive' controller='0' bus='0' target='0' unit='4'/> + </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example/1'> + <host name='example.org' port='3260'/> + </source> + <address type='drive' controller='0' bus='0' target='0' unit='5'/> + </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 022f6786b98..ea9c919f27d 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1042,9 +1042,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); - DO_TEST("hostdev-scsi-lsi-iscsi", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); DO_TEST("hostdev-scsi-lsi-iscsi-auth", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); -- 2.26.2

We can add the authenticated iSCSI hostdevs to the same test file. Additionally this now covers passing secret via the 'secret' object rather than on the command line. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../hostdev-scsi-lsi-iscsi-auth.args | 37 ------------ .../hostdev-scsi-lsi-iscsi-auth.xml | 48 ---------------- .../hostdev-scsi-lsi.x86_64-2.8.0.args | 6 ++ .../hostdev-scsi-lsi.x86_64-4.1.0.args | 16 ++++++ .../hostdev-scsi-lsi.x86_64-latest.args | 16 ++++++ tests/qemuxml2argvdata/hostdev-scsi-lsi.xml | 18 ++++++ tests/qemuxml2argvtest.c | 3 - .../hostdev-scsi-lsi-iscsi-auth.xml | 57 ------------------- tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml | 18 ++++++ tests/qemuxml2xmltest.c | 3 - 10 files changed, 74 insertions(+), 148 deletions(-) delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi-auth.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi-auth.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-lsi-iscsi-auth.xml diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi-auth.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi-auth.args deleted file mode 100644 index 03e77517b48..00000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi-auth.args +++ /dev/null @@ -1,37 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest2 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest2/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest2/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest2 \ --S \ --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-9466-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest2/monitor.sock,\ -server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --device lsi,id=scsi0,bus=pci.0,addr=0x3 \ --usb \ --drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \ --device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ --drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\ -3260/iqn.1992-01.com.example%3Astorage/1,if=none,format=raw,id=drive-hostdev0 \ --device scsi-generic,bus=scsi0.0,scsi-id=4,drive=drive-hostdev0,id=hostdev0 \ --drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\ -3260/iqn.1992-01.com.example%3Astorage/2,if=none,format=raw,id=drive-hostdev1 \ --device scsi-generic,bus=scsi0.0,scsi-id=5,drive=drive-hostdev1,id=hostdev1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi-auth.xml b/tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi-auth.xml deleted file mode 100644 index 439aa05db02..00000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi-auth.xml +++ /dev/null @@ -1,48 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest2</name> - <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> - <disk type='block' device='disk'> - <source dev='/dev/HostVG/QEMUGuest2'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='scsi' index='0'/> - <controller type='usb' index='0'/> - <controller type='ide' index='0'/> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> - <host name='example.org' port='3260'/> - <auth username='myname'> - <secret type='iscsi' usage='mycluster_myname'/> - </auth> - </source> - <address type='drive' controller='0' bus='0' target='0' unit='4'/> - </hostdev> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> - <host name='example.org' port='3260'/> - <auth username='myname'> - <secret type='iscsi' usage='mycluster_myname'/> - </auth> - </source> - <address type='drive' controller='0' bus='0' target='0' unit='5'/> - </hostdev> - <memballoon model='virtio'/> - </devices> -</domain> diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args index fc02c613875..51dd2da7de2 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args @@ -41,5 +41,11 @@ format=raw,id=drive-hostdev2 \ -drive file=iscsi://example.org:3260/iqn.1992-01.com.example/1,if=none,\ format=raw,id=drive-hostdev3 \ -device scsi-generic,bus=scsi0.0,scsi-id=5,drive=drive-hostdev3,id=hostdev3 \ +-drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\ +3260/iqn.1992-01.com.example%3Astorage/1,if=none,format=raw,id=drive-hostdev4 \ +-device scsi-generic,bus=scsi0.0,scsi-id=3,drive=drive-hostdev4,id=hostdev4 \ +-drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\ +3260/iqn.1992-01.com.example%3Astorage/2,if=none,format=raw,id=drive-hostdev5 \ +-device scsi-generic,bus=scsi0.0,scsi-id=2,drive=drive-hostdev5,id=hostdev5 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args index af45fd8cb25..cee891199dd 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args @@ -42,6 +42,22 @@ format=raw,id=drive-hostdev2 \ file.target=iqn.1992-01.com.example,file.lun=1,file.transport=tcp,if=none,\ format=raw,id=drive-hostdev3 \ -device scsi-generic,bus=scsi0.0,scsi-id=5,drive=drive-hostdev3,id=hostdev3 \ +-object secret,id=hostdev4-secret0,\ +data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example:storage,file.lun=1,file.transport=tcp,\ +file.user=myname,file.password-secret=hostdev4-secret0,if=none,format=raw,\ +id=drive-hostdev4 \ +-device scsi-generic,bus=scsi0.0,scsi-id=3,drive=drive-hostdev4,id=hostdev4 \ +-object secret,id=hostdev5-secret0,\ +data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example:storage,file.lun=2,file.transport=tcp,\ +file.user=myname,file.password-secret=hostdev5-secret0,if=none,format=raw,\ +id=drive-hostdev5 \ +-device scsi-generic,bus=scsi0.0,scsi-id=2,drive=drive-hostdev5,id=hostdev5 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args index 32aacd6224e..76a0708336a 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args @@ -46,6 +46,22 @@ format=raw,id=drive-hostdev2 \ file.target=iqn.1992-01.com.example,file.lun=1,file.transport=tcp,if=none,\ format=raw,id=drive-hostdev3 \ -device scsi-generic,bus=scsi0.0,scsi-id=5,drive=drive-hostdev3,id=hostdev3 \ +-object secret,id=hostdev4-secret0,\ +data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example:storage,file.lun=1,file.transport=tcp,\ +file.user=myname,file.password-secret=hostdev4-secret0,if=none,format=raw,\ +id=drive-hostdev4 \ +-device scsi-generic,bus=scsi0.0,scsi-id=3,drive=drive-hostdev4,id=hostdev4 \ +-object secret,id=hostdev5-secret0,\ +data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example:storage,file.lun=2,file.transport=tcp,\ +file.user=myname,file.password-secret=hostdev5-secret0,if=none,format=raw,\ +id=drive-hostdev5 \ +-device scsi-generic,bus=scsi0.0,scsi-id=2,drive=drive-hostdev5,id=hostdev5 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/hostdev-scsi-lsi.xml b/tests/qemuxml2argvdata/hostdev-scsi-lsi.xml index 671bc20f262..9f45084f1cb 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-lsi.xml +++ b/tests/qemuxml2argvdata/hostdev-scsi-lsi.xml @@ -52,6 +52,24 @@ </source> <address type='drive' controller='0' bus='0' target='0' unit='5'/> </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> + <host name='example.org' port='3260'/> + <auth username='myname'> + <secret type='iscsi' usage='mycluster_myname'/> + </auth> + </source> + <address type='drive' controller='0' bus='0' target='0' unit='3'/> + </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> + <host name='example.org' port='3260'/> + <auth username='myname'> + <secret type='iscsi' usage='mycluster_myname'/> + </auth> + </source> + <address type='drive' controller='0' bus='0' target='0' unit='2'/> + </hostdev> <memballoon model='virtio'/> </devices> </domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index c542a7534e8..3cef0616a50 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2669,9 +2669,6 @@ mymain(void) DO_TEST("hostdev-scsi-virtio-scsi", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); - DO_TEST("hostdev-scsi-lsi-iscsi-auth", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); DO_TEST("hostdev-scsi-virtio-iscsi", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-lsi-iscsi-auth.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-lsi-iscsi-auth.xml deleted file mode 100644 index d0e025d8151..00000000000 --- a/tests/qemuxml2xmloutdata/hostdev-scsi-lsi-iscsi-auth.xml +++ /dev/null @@ -1,57 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest2</name> - <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest2'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='scsi' index='0' model='lsilogic'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </controller> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> - <host name='example.org' port='3260'/> - <auth username='myname'> - <secret type='iscsi' usage='mycluster_myname'/> - </auth> - </source> - <address type='drive' controller='0' bus='0' target='0' unit='4'/> - </hostdev> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> - <host name='example.org' port='3260'/> - <auth username='myname'> - <secret type='iscsi' usage='mycluster_myname'/> - </auth> - </source> - <address type='drive' controller='0' bus='0' target='0' unit='5'/> - </hostdev> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml index b314856d8b7..9cefc3471ca 100644 --- a/tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml +++ b/tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml @@ -59,6 +59,24 @@ </source> <address type='drive' controller='0' bus='0' target='0' unit='5'/> </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> + <host name='example.org' port='3260'/> + <auth username='myname'> + <secret type='iscsi' usage='mycluster_myname'/> + </auth> + </source> + <address type='drive' controller='0' bus='0' target='0' unit='3'/> + </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> + <host name='example.org' port='3260'/> + <auth username='myname'> + <secret type='iscsi' usage='mycluster_myname'/> + </auth> + </source> + <address type='drive' controller='0' bus='0' target='0' unit='2'/> + </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index ea9c919f27d..2857f4f30f9 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1042,9 +1042,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); - DO_TEST("hostdev-scsi-lsi-iscsi-auth", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); DO_TEST("hostdev-scsi-virtio-iscsi", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); -- 2.26.2

Modernize the current state to the pre-blockdev version of qemu to minimize changes. Later patch will add a 'latest' case too. Additionally this removes duplicated call of the same test. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...ostdev-scsi-virtio-scsi.x86_64-4.1.0.args} | 21 ++++++++++++------- tests/qemuxml2argvtest.c | 7 +------ 2 files changed, 14 insertions(+), 14 deletions(-) rename tests/qemuxml2argvdata/{hostdev-scsi-virtio-scsi.args => hostdev-scsi-virtio-scsi.x86_64-4.1.0.args} (59%) diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args similarity index 59% rename from tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.args rename to tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args index 364c4a10a58..e74fd1118ca 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args @@ -8,27 +8,32 @@ XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest2/.cache \ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ QEMU_AUDIO_DRV=none \ /usr/bin/qemu-system-i386 \ --name QEMUGuest2 \ +-name guest=QEMUGuest2,debug-threads=on \ -S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ +-machine pc-i440fx-4.1,accel=tcg,usb=off,dump-guest-core=off \ -m 214 \ --realtime mlock=off \ +-overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid c7a5fdbd-edaf-9466-926a-d65c16db1809 \ -display none \ -no-user-config \ -nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest2/monitor.sock,\ -server,nowait \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ -no-shutdown \ -no-acpi \ --device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 \ --usb \ +-boot strict=on \ +-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ +-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x2 \ -drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \ -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\ drive=drive-hostdev0,id=hostdev0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 +-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 3cef0616a50..9d877d7d2b4 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2659,16 +2659,11 @@ mymain(void) DO_TEST_CAPS_VER("hostdev-scsi-lsi", "2.8.0"); DO_TEST_CAPS_VER("hostdev-scsi-lsi", "4.1.0"); DO_TEST_CAPS_LATEST("hostdev-scsi-lsi"); + DO_TEST_CAPS_VER("hostdev-scsi-virtio-scsi", "4.1.0"); - DO_TEST("hostdev-scsi-virtio-scsi", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); DO_TEST("hostdev-scsi-readonly", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); - DO_TEST("hostdev-scsi-virtio-scsi", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); DO_TEST("hostdev-scsi-virtio-iscsi", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); -- 2.26.2

Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...ostdev-scsi-virtio-scsi.x86_64-latest.args | 43 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 2 files changed, 44 insertions(+) create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args new file mode 100644 index 00000000000..9a70b6eeb0f --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args @@ -0,0 +1,43 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest2 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest2/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest2/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-i386 \ +-name guest=QEMUGuest2,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-cpu qemu64 \ +-m 214 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9466-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 \ +-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x2 \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2",\ +"node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw",\ +"file":"libvirt-1-storage"}' \ +-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \ +-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\ +drive=drive-hostdev0,id=hostdev0 \ +-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 9d877d7d2b4..1f3e836698a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2660,6 +2660,7 @@ mymain(void) DO_TEST_CAPS_VER("hostdev-scsi-lsi", "4.1.0"); DO_TEST_CAPS_LATEST("hostdev-scsi-lsi"); DO_TEST_CAPS_VER("hostdev-scsi-virtio-scsi", "4.1.0"); + DO_TEST_CAPS_LATEST("hostdev-scsi-virtio-scsi"); DO_TEST("hostdev-scsi-readonly", QEMU_CAPS_VIRTIO_SCSI, -- 2.26.2

qemu-2.8 didn't yet support QEMU_CAPS_ISCSI_PASSWORD_SECRET. This version will allow integrating multiple test cases into one. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...hostdev-scsi-virtio-scsi.x86_64-2.8.0.args | 38 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 2 files changed, 39 insertions(+) create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args new file mode 100644 index 00000000000..810d02a408a --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args @@ -0,0 +1,38 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest2 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest2/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest2/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-i386 \ +-name guest=QEMUGuest2,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ +-machine pc-i440fx-2.8,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9466-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest2/monitor.sock,\ +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 \ +-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x2 \ +-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \ +-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ +-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\ +drive=drive-hostdev0,id=hostdev0 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ +-msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 1f3e836698a..d9544a511b7 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2659,6 +2659,7 @@ mymain(void) DO_TEST_CAPS_VER("hostdev-scsi-lsi", "2.8.0"); DO_TEST_CAPS_VER("hostdev-scsi-lsi", "4.1.0"); DO_TEST_CAPS_LATEST("hostdev-scsi-lsi"); + DO_TEST_CAPS_VER("hostdev-scsi-virtio-scsi", "2.8.0"); DO_TEST_CAPS_VER("hostdev-scsi-virtio-scsi", "4.1.0"); DO_TEST_CAPS_LATEST("hostdev-scsi-virtio-scsi"); -- 2.26.2

This can be tested along with other stuff. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../hostdev-scsi-readonly.args | 34 -------------- .../hostdev-scsi-readonly.xml | 38 --------------- ...hostdev-scsi-virtio-scsi.x86_64-2.8.0.args | 3 ++ ...hostdev-scsi-virtio-scsi.x86_64-4.1.0.args | 3 ++ ...ostdev-scsi-virtio-scsi.x86_64-latest.args | 3 ++ .../hostdev-scsi-virtio-scsi.xml | 8 ++++ tests/qemuxml2argvtest.c | 3 -- .../hostdev-scsi-readonly.xml | 47 ------------------- .../hostdev-scsi-virtio-scsi.xml | 8 ++++ tests/qemuxml2xmltest.c | 3 -- 10 files changed, 25 insertions(+), 125 deletions(-) delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-readonly.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-readonly.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-readonly.xml diff --git a/tests/qemuxml2argvdata/hostdev-scsi-readonly.args b/tests/qemuxml2argvdata/hostdev-scsi-readonly.args deleted file mode 100644 index 0e481e74647..00000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-readonly.args +++ /dev/null @@ -1,34 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest2 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest2/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest2/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest2 \ --S \ --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-9466-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest2/monitor.sock,\ -server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 \ --usb \ --drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \ --device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ --drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0,readonly=on \ --device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\ -drive=drive-hostdev0,id=hostdev0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/hostdev-scsi-readonly.xml b/tests/qemuxml2argvdata/hostdev-scsi-readonly.xml deleted file mode 100644 index 2e70edd6400..00000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-readonly.xml +++ /dev/null @@ -1,38 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest2</name> - <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> - <disk type='block' device='disk'> - <source dev='/dev/HostVG/QEMUGuest2'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='scsi' index='0' model='virtio-scsi'/> - <controller type='usb' index='0'/> - <controller type='ide' index='0'/> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source> - <adapter name='scsi_host0'/> - <address bus='0' target='0' unit='0'/> - </source> - <readonly/> - <address type='drive' controller='0' bus='0' target='4' unit='8'/> - </hostdev> - <memballoon model='virtio'/> - </devices> -</domain> diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args index 810d02a408a..50353df478c 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args @@ -34,5 +34,8 @@ server,nowait \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\ drive=drive-hostdev0,id=hostdev0 \ +-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=7,\ +drive=drive-hostdev1,id=hostdev1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args index e74fd1118ca..e0680fce4cf 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args @@ -33,6 +33,9 @@ file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\ drive=drive-hostdev0,id=hostdev0 \ +-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=7,\ +drive=drive-hostdev1,id=hostdev1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args index 9a70b6eeb0f..0da84d08b30 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args @@ -37,6 +37,9 @@ file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\ drive=drive-hostdev0,id=hostdev0 \ +-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=7,\ +drive=drive-hostdev1,id=hostdev1 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml index 0fe01de1abd..013c8cd17f7 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml @@ -32,6 +32,14 @@ </source> <address type='drive' controller='0' bus='0' target='4' unit='8'/> </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source> + <adapter name='scsi_host0'/> + <address bus='0' target='0' unit='1'/> + </source> + <readonly/> + <address type='drive' controller='0' bus='0' target='4' unit='7'/> + </hostdev> <memballoon model='virtio'/> </devices> </domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index d9544a511b7..e10d90fbf88 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2663,9 +2663,6 @@ mymain(void) DO_TEST_CAPS_VER("hostdev-scsi-virtio-scsi", "4.1.0"); DO_TEST_CAPS_LATEST("hostdev-scsi-virtio-scsi"); - DO_TEST("hostdev-scsi-readonly", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); DO_TEST("hostdev-scsi-virtio-iscsi", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-readonly.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-readonly.xml deleted file mode 100644 index 17bb7e3904d..00000000000 --- a/tests/qemuxml2xmloutdata/hostdev-scsi-readonly.xml +++ /dev/null @@ -1,47 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest2</name> - <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest2'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='scsi' index='0' model='virtio-scsi'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </controller> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source> - <adapter name='scsi_host0'/> - <address bus='0' target='0' unit='0'/> - </source> - <readonly/> - <address type='drive' controller='0' bus='0' target='4' unit='8'/> - </hostdev> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml index 81ae94318b5..a1fa36de386 100644 --- a/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml +++ b/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml @@ -39,6 +39,14 @@ </source> <address type='drive' controller='0' bus='0' target='4' unit='8'/> </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source> + <adapter name='scsi_host0'/> + <address bus='0' target='0' unit='1'/> + </source> + <readonly/> + <address type='drive' controller='0' bus='0' target='4' unit='7'/> + </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 2857f4f30f9..d3da788979d 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1021,9 +1021,6 @@ mymain(void) DO_TEST("hostdev-scsi-virtio-scsi", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); - DO_TEST("hostdev-scsi-readonly", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); DO_TEST("hostdev-scsi-shareable", QEMU_CAPS_VIRTIO_SCSI, -- 2.26.2

We can add the iSCSI hostdevs to the same test file. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- .../hostdev-scsi-virtio-iscsi.args | 39 -------------- .../hostdev-scsi-virtio-iscsi.xml | 42 --------------- ...hostdev-scsi-virtio-scsi.x86_64-2.8.0.args | 8 +++ ...hostdev-scsi-virtio-scsi.x86_64-4.1.0.args | 10 ++++ ...ostdev-scsi-virtio-scsi.x86_64-latest.args | 10 ++++ .../hostdev-scsi-virtio-scsi.xml | 12 +++++ tests/qemuxml2argvtest.c | 3 -- .../hostdev-scsi-virtio-iscsi.xml | 51 ------------------- .../hostdev-scsi-virtio-scsi.xml | 12 +++++ tests/qemuxml2xmltest.c | 3 -- 10 files changed, 52 insertions(+), 138 deletions(-) delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-virtio-iscsi.xml diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi.args deleted file mode 100644 index 050e74a449d..00000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi.args +++ /dev/null @@ -1,39 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest2 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest2/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest2/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest2 \ --S \ --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-9466-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest2/monitor.sock,\ -server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 \ --usb \ --drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \ --device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ --drive file=iscsi://example.org:3260/iqn.1992-01.com.example/0,if=none,\ -format=raw,id=drive-hostdev0 \ --device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=4,\ -drive=drive-hostdev0,id=hostdev0 \ --drive file=iscsi://example.org:3260/iqn.1992-01.com.example/1,if=none,\ -format=raw,id=drive-hostdev1 \ --device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=5,\ -drive=drive-hostdev1,id=hostdev1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi.xml b/tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi.xml deleted file mode 100644 index 88684c94054..00000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi.xml +++ /dev/null @@ -1,42 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest2</name> - <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> - <disk type='block' device='disk'> - <source dev='/dev/HostVG/QEMUGuest2'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='scsi' index='0' model='virtio-scsi'/> - <controller type='usb' index='0'/> - <controller type='ide' index='0'/> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example'> - <host name='example.org' port='3260'/> - </source> - <address type='drive' controller='0' bus='0' target='2' unit='4'/> - </hostdev> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example/1'> - <host name='example.org' port='3260'/> - </source> - <address type='drive' controller='0' bus='0' target='2' unit='5'/> - </hostdev> - <memballoon model='virtio'/> - </devices> -</domain> diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args index 50353df478c..c4b0b7ef7f6 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args @@ -37,5 +37,13 @@ drive=drive-hostdev0,id=hostdev0 \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=7,\ drive=drive-hostdev1,id=hostdev1 \ +-drive file=iscsi://example.org:3260/iqn.1992-01.com.example/0,if=none,\ +format=raw,id=drive-hostdev2 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=4,\ +drive=drive-hostdev2,id=hostdev2 \ +-drive file=iscsi://example.org:3260/iqn.1992-01.com.example/1,if=none,\ +format=raw,id=drive-hostdev3 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=5,\ +drive=drive-hostdev3,id=hostdev3 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args index e0680fce4cf..c691b1dc050 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args @@ -36,6 +36,16 @@ drive=drive-hostdev0,id=hostdev0 \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=7,\ drive=drive-hostdev1,id=hostdev1 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example,file.lun=0,file.transport=tcp,if=none,\ +format=raw,id=drive-hostdev2 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=4,\ +drive=drive-hostdev2,id=hostdev2 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example,file.lun=1,file.transport=tcp,if=none,\ +format=raw,id=drive-hostdev3 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=5,\ +drive=drive-hostdev3,id=hostdev3 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args index 0da84d08b30..6d00994e4d5 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args @@ -40,6 +40,16 @@ drive=drive-hostdev0,id=hostdev0 \ -drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev1,readonly=on \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=7,\ drive=drive-hostdev1,id=hostdev1 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example,file.lun=0,file.transport=tcp,if=none,\ +format=raw,id=drive-hostdev2 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=4,\ +drive=drive-hostdev2,id=hostdev2 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example,file.lun=1,file.transport=tcp,if=none,\ +format=raw,id=drive-hostdev3 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=5,\ +drive=drive-hostdev3,id=hostdev3 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml index 013c8cd17f7..eec78b1c736 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml @@ -40,6 +40,18 @@ <readonly/> <address type='drive' controller='0' bus='0' target='4' unit='7'/> </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example'> + <host name='example.org' port='3260'/> + </source> + <address type='drive' controller='0' bus='0' target='2' unit='4'/> + </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example/1'> + <host name='example.org' port='3260'/> + </source> + <address type='drive' controller='0' bus='0' target='2' unit='5'/> + </hostdev> <memballoon model='virtio'/> </devices> </domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index e10d90fbf88..7a001b797a7 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2663,9 +2663,6 @@ mymain(void) DO_TEST_CAPS_VER("hostdev-scsi-virtio-scsi", "4.1.0"); DO_TEST_CAPS_LATEST("hostdev-scsi-virtio-scsi"); - DO_TEST("hostdev-scsi-virtio-iscsi", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); DO_TEST("hostdev-scsi-virtio-iscsi-auth", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-iscsi.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-iscsi.xml deleted file mode 100644 index 4addf5ebc87..00000000000 --- a/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-iscsi.xml +++ /dev/null @@ -1,51 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest2</name> - <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest2'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='scsi' index='0' model='virtio-scsi'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </controller> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example/0'> - <host name='example.org' port='3260'/> - </source> - <address type='drive' controller='0' bus='0' target='2' unit='4'/> - </hostdev> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example/1'> - <host name='example.org' port='3260'/> - </source> - <address type='drive' controller='0' bus='0' target='2' unit='5'/> - </hostdev> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml index a1fa36de386..a8d70ef31be 100644 --- a/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml +++ b/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml @@ -47,6 +47,18 @@ <readonly/> <address type='drive' controller='0' bus='0' target='4' unit='7'/> </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example/0'> + <host name='example.org' port='3260'/> + </source> + <address type='drive' controller='0' bus='0' target='2' unit='4'/> + </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example/1'> + <host name='example.org' port='3260'/> + </source> + <address type='drive' controller='0' bus='0' target='2' unit='5'/> + </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index d3da788979d..edbd75039d3 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1039,9 +1039,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); - DO_TEST("hostdev-scsi-virtio-iscsi", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); DO_TEST("hostdev-scsi-virtio-iscsi-auth", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); -- 2.26.2

Integrate both 'disk-hostdev-scsi-virtio-iscsi-auth-AES' and 'hostdev-scsi-virtio-iscsi-auth' as the new test infrastructure tests both legacy and 'secret' object cases. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...sk-hostdev-scsi-virtio-iscsi-auth-AES.args | 49 ---------------- ...isk-hostdev-scsi-virtio-iscsi-auth-AES.xml | 43 -------------- .../hostdev-scsi-virtio-iscsi-auth.args | 39 ------------- .../hostdev-scsi-virtio-iscsi-auth.xml | 48 ---------------- ...hostdev-scsi-virtio-scsi.x86_64-2.8.0.args | 8 +++ ...hostdev-scsi-virtio-scsi.x86_64-4.1.0.args | 18 ++++++ ...ostdev-scsi-virtio-scsi.x86_64-latest.args | 18 ++++++ .../hostdev-scsi-virtio-scsi.xml | 18 ++++++ tests/qemuxml2argvtest.c | 8 --- .../hostdev-scsi-virtio-iscsi-auth.xml | 57 ------------------- .../hostdev-scsi-virtio-scsi.xml | 18 ++++++ tests/qemuxml2xmltest.c | 4 -- 12 files changed, 80 insertions(+), 248 deletions(-) delete mode 100644 tests/qemuxml2argvdata/disk-hostdev-scsi-virtio-iscsi-auth-AES.args delete mode 100644 tests/qemuxml2argvdata/disk-hostdev-scsi-virtio-iscsi-auth-AES.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi-auth.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi-auth.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-virtio-iscsi-auth.xml diff --git a/tests/qemuxml2argvdata/disk-hostdev-scsi-virtio-iscsi-auth-AES.args b/tests/qemuxml2argvdata/disk-hostdev-scsi-virtio-iscsi-auth-AES.args deleted file mode 100644 index 47b014aacc1..00000000000 --- a/tests/qemuxml2argvdata/disk-hostdev-scsi-virtio-iscsi-auth-AES.args +++ /dev/null @@ -1,49 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest2 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest2/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest2/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest2 \ --S \ --object secret,id=masterKey0,format=raw,\ -file=/tmp/lib/domain--1-QEMUGuest2/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-9466-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest2/monitor.sock,\ -server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 \ --usb \ --object secret,id=virtio-disk0-auth-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-auth-secret0,format=raw,\ -if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\ -id=virtio-disk0,bootindex=1 \ --object secret,id=hostdev0-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=2,file.transport=tcp,\ -file.user=myname,file.password-secret=hostdev0-secret0,if=none,format=raw,\ -id=drive-hostdev0 \ --device scsi-generic,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\ -drive=drive-hostdev0,id=hostdev0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/disk-hostdev-scsi-virtio-iscsi-auth-AES.xml b/tests/qemuxml2argvdata/disk-hostdev-scsi-virtio-iscsi-auth-AES.xml deleted file mode 100644 index 3b13f9284c1..00000000000 --- a/tests/qemuxml2argvdata/disk-hostdev-scsi-virtio-iscsi-auth-AES.xml +++ /dev/null @@ -1,43 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest2</name> - <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> - <disk type='network' device='disk'> - <driver name='qemu' type='raw'/> - <auth username='myname'> - <secret type='iscsi' usage='mycluster_myname'/> - </auth> - <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> - <host name='example.org' port='6000'/> - </source> - <target dev='vda' bus='virtio'/> - </disk> - <controller type='scsi' index='0' model='virtio-scsi'/> - <controller type='usb' index='0'/> - <controller type='ide' index='0'/> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> - <host name='example.org' port='6000'/> - <auth username='myname'> - <secret type='iscsi' usage='mycluster_myname'/> - </auth> - </source> - </hostdev> - <memballoon model='virtio'/> - </devices> -</domain> diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi-auth.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi-auth.args deleted file mode 100644 index 4ce2029adb7..00000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi-auth.args +++ /dev/null @@ -1,39 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest2 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest2/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest2/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-i386 \ --name QEMUGuest2 \ --S \ --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-9466-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest2/monitor.sock,\ -server,nowait \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 \ --usb \ --drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \ --device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ --drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\ -3260/iqn.1992-01.com.example%3Astorage/1,if=none,format=raw,id=drive-hostdev0 \ --device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=4,\ -drive=drive-hostdev0,id=hostdev0 \ --drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\ -3260/iqn.1992-01.com.example%3Astorage/2,if=none,format=raw,id=drive-hostdev1 \ --device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=5,\ -drive=drive-hostdev1,id=hostdev1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi-auth.xml b/tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi-auth.xml deleted file mode 100644 index 388cd63314f..00000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi-auth.xml +++ /dev/null @@ -1,48 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest2</name> - <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> - <disk type='block' device='disk'> - <source dev='/dev/HostVG/QEMUGuest2'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='scsi' index='0' model='virtio-scsi'/> - <controller type='usb' index='0'/> - <controller type='ide' index='0'/> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> - <host name='example.org' port='3260'/> - <auth username='myname'> - <secret type='iscsi' usage='mycluster_myname'/> - </auth> - </source> - <address type='drive' controller='0' bus='0' target='2' unit='4'/> - </hostdev> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> - <host name='example.org' port='3260'/> - <auth username='myname'> - <secret type='iscsi' usage='mycluster_myname'/> - </auth> - </source> - <address type='drive' controller='0' bus='0' target='2' unit='5'/> - </hostdev> - <memballoon model='virtio'/> - </devices> -</domain> diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args index c4b0b7ef7f6..c5a3c0ce61d 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-2.8.0.args @@ -45,5 +45,13 @@ drive=drive-hostdev2,id=hostdev2 \ format=raw,id=drive-hostdev3 \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=5,\ drive=drive-hostdev3,id=hostdev3 \ +-drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\ +3260/iqn.1992-01.com.example%3Astorage/1,if=none,format=raw,id=drive-hostdev4 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=3,lun=4,\ +drive=drive-hostdev4,id=hostdev4 \ +-drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\ +3260/iqn.1992-01.com.example%3Astorage/2,if=none,format=raw,id=drive-hostdev5 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=3,lun=5,\ +drive=drive-hostdev5,id=hostdev5 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args index c691b1dc050..de4047000ea 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args @@ -46,6 +46,24 @@ file.target=iqn.1992-01.com.example,file.lun=1,file.transport=tcp,if=none,\ format=raw,id=drive-hostdev3 \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=5,\ drive=drive-hostdev3,id=hostdev3 \ +-object secret,id=hostdev4-secret0,\ +data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example:storage,file.lun=1,file.transport=tcp,\ +file.user=myname,file.password-secret=hostdev4-secret0,if=none,format=raw,\ +id=drive-hostdev4 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=3,lun=4,\ +drive=drive-hostdev4,id=hostdev4 \ +-object secret,id=hostdev5-secret0,\ +data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example:storage,file.lun=2,file.transport=tcp,\ +file.user=myname,file.password-secret=hostdev5-secret0,if=none,format=raw,\ +id=drive-hostdev5 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=3,lun=5,\ +drive=drive-hostdev5,id=hostdev5 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args index 6d00994e4d5..99b0117447a 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args @@ -50,6 +50,24 @@ file.target=iqn.1992-01.com.example,file.lun=1,file.transport=tcp,if=none,\ format=raw,id=drive-hostdev3 \ -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=5,\ drive=drive-hostdev3,id=hostdev3 \ +-object secret,id=hostdev4-secret0,\ +data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example:storage,file.lun=1,file.transport=tcp,\ +file.user=myname,file.password-secret=hostdev4-secret0,if=none,format=raw,\ +id=drive-hostdev4 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=3,lun=4,\ +drive=drive-hostdev4,id=hostdev4 \ +-object secret,id=hostdev5-secret0,\ +data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ +-drive file.driver=iscsi,file.portal=example.org:3260,\ +file.target=iqn.1992-01.com.example:storage,file.lun=2,file.transport=tcp,\ +file.user=myname,file.password-secret=hostdev5-secret0,if=none,format=raw,\ +id=drive-hostdev5 \ +-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=3,lun=5,\ +drive=drive-hostdev5,id=hostdev5 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ diff --git a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml index eec78b1c736..775b678b368 100644 --- a/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml +++ b/tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.xml @@ -52,6 +52,24 @@ </source> <address type='drive' controller='0' bus='0' target='2' unit='5'/> </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> + <host name='example.org' port='3260'/> + <auth username='myname'> + <secret type='iscsi' usage='mycluster_myname'/> + </auth> + </source> + <address type='drive' controller='0' bus='0' target='3' unit='4'/> + </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> + <host name='example.org' port='3260'/> + <auth username='myname'> + <secret type='iscsi' usage='mycluster_myname'/> + </auth> + </source> + <address type='drive' controller='0' bus='0' target='3' unit='5'/> + </hostdev> <memballoon model='virtio'/> </devices> </domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7a001b797a7..337fe1acdab 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2663,14 +2663,6 @@ mymain(void) DO_TEST_CAPS_VER("hostdev-scsi-virtio-scsi", "4.1.0"); DO_TEST_CAPS_LATEST("hostdev-scsi-virtio-scsi"); - DO_TEST("hostdev-scsi-virtio-iscsi-auth", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); - DO_TEST("disk-hostdev-scsi-virtio-iscsi-auth-AES", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI, - QEMU_CAPS_OBJECT_SECRET, - QEMU_CAPS_ISCSI_PASSWORD_SECRET); DO_TEST("hostdev-scsi-vhost-scsi-ccw", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI, QEMU_CAPS_CCW); diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-iscsi-auth.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-iscsi-auth.xml deleted file mode 100644 index b6dc1dbb8fe..00000000000 --- a/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-iscsi-auth.xml +++ /dev/null @@ -1,57 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest2</name> - <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> - <memory unit='KiB'>219100</memory> - <currentMemory unit='KiB'>219100</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='i686' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest2'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='scsi' index='0' model='virtio-scsi'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> - </controller> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> - <host name='example.org' port='3260'/> - <auth username='myname'> - <secret type='iscsi' usage='mycluster_myname'/> - </auth> - </source> - <address type='drive' controller='0' bus='0' target='2' unit='4'/> - </hostdev> - <hostdev mode='subsystem' type='scsi' managed='yes'> - <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> - <host name='example.org' port='3260'/> - <auth username='myname'> - <secret type='iscsi' usage='mycluster_myname'/> - </auth> - </source> - <address type='drive' controller='0' bus='0' target='2' unit='5'/> - </hostdev> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml index a8d70ef31be..9c823809abf 100644 --- a/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml +++ b/tests/qemuxml2xmloutdata/hostdev-scsi-virtio-scsi.xml @@ -59,6 +59,24 @@ </source> <address type='drive' controller='0' bus='0' target='2' unit='5'/> </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'> + <host name='example.org' port='3260'/> + <auth username='myname'> + <secret type='iscsi' usage='mycluster_myname'/> + </auth> + </source> + <address type='drive' controller='0' bus='0' target='3' unit='4'/> + </hostdev> + <hostdev mode='subsystem' type='scsi' managed='yes'> + <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'> + <host name='example.org' port='3260'/> + <auth username='myname'> + <secret type='iscsi' usage='mycluster_myname'/> + </auth> + </source> + <address type='drive' controller='0' bus='0' target='3' unit='5'/> + </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </memballoon> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index edbd75039d3..2b61a6459e2 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1039,10 +1039,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI); - DO_TEST("hostdev-scsi-virtio-iscsi-auth", - QEMU_CAPS_VIRTIO_SCSI, - QEMU_CAPS_SCSI_LSI); - DO_TEST("hostdev-subsys-mdev-vfio-ccw", QEMU_CAPS_CCW, QEMU_CAPS_CCW_CSSID_UNRESTRICTED, -- 2.26.2

On 6/22/20 5:42 PM, Peter Krempa wrote:
Switch to qemu caps based testing to validate pre and post blockdev configs.
This is split out from my unfinished series for switching hostdevs to blockdev.
Peter Krempa (12): qemuxml2argvtest: hostdev-scsi-lsi: Modernize to qemu-4.1 qemuxml2argvtest: hostdev-scsi-lsi: Add qemu-2.8 variant qemuxml2argvtest: hostdev-scsi-lsi: Add "latest" caps version qemuxml2argvtest: hostdev-scsi-lsi: Add test of readonly variant qemuxml2argvtest: hostdev-scsi-lsi: Integrate 'hostdev-scsi-lsi-iscsi' case qemuxml2argvtest: hostdev-scsi-lsi: Integrate 'hostdev-scsi-lsi-iscsi-auth' case qemuxml2argvtest: hostdev-scsi-virtio-scsi: Modernize to qemu-4.1 qemuxml2argvtest: hostdev-scsi-virtio-scsi: Add "latest" caps version qemuxml2argvtest: hostdev-scsi-virtio-scsi: Add qemu-2.8 variant qemuxml2argvtest: hostdev-scsi-virtio-scsi: Integrate 'hostdev-scsi-readonly' qemuxml2argvtest: hostdev-scsi-virtio-scsi: Integrate 'hostdev-scsi-virtio-iscsi' case qemuxml2argvtest: hostdev-scsi-virtio-scsi: Integrate iSCSI authentication cases
...sk-hostdev-scsi-virtio-iscsi-auth-AES.args | 49 ------------ ...isk-hostdev-scsi-virtio-iscsi-auth-AES.xml | 43 ----------- .../hostdev-scsi-lsi-iscsi-auth.args | 37 ---------- .../hostdev-scsi-lsi-iscsi-auth.xml | 48 ------------ .../hostdev-scsi-lsi-iscsi.args | 37 ---------- .../hostdev-scsi-lsi-iscsi.xml | 42 ----------- tests/qemuxml2argvdata/hostdev-scsi-lsi.args | 33 --------- .../hostdev-scsi-lsi.x86_64-2.8.0.args | 51 +++++++++++++ .../hostdev-scsi-lsi.x86_64-4.1.0.args | 64 ++++++++++++++++ .../hostdev-scsi-lsi.x86_64-latest.args | 68 +++++++++++++++++ tests/qemuxml2argvdata/hostdev-scsi-lsi.xml | 38 ++++++++++ .../hostdev-scsi-readonly.args | 34 --------- .../hostdev-scsi-readonly.xml | 38 ---------- .../hostdev-scsi-virtio-iscsi-auth.xml | 48 ------------ .../hostdev-scsi-virtio-iscsi.args | 39 ---------- .../hostdev-scsi-virtio-iscsi.xml | 42 ----------- .../hostdev-scsi-virtio-scsi.args | 34 --------- ...ostdev-scsi-virtio-scsi.x86_64-2.8.0.args} | 40 +++++++--- ...hostdev-scsi-virtio-scsi.x86_64-4.1.0.args | 70 ++++++++++++++++++ ...ostdev-scsi-virtio-scsi.x86_64-latest.args | 74 +++++++++++++++++++ .../hostdev-scsi-virtio-scsi.xml | 38 ++++++++++ tests/qemuxml2argvtest.c | 36 ++------- .../hostdev-scsi-lsi-iscsi-auth.xml | 57 -------------- .../hostdev-scsi-lsi-iscsi.xml | 51 ------------- tests/qemuxml2xmloutdata/hostdev-scsi-lsi.xml | 38 ++++++++++ .../hostdev-scsi-readonly.xml | 47 ------------ .../hostdev-scsi-virtio-iscsi-auth.xml | 57 -------------- .../hostdev-scsi-virtio-iscsi.xml | 51 ------------- .../hostdev-scsi-virtio-scsi.xml | 38 ++++++++++ tests/qemuxml2xmltest.c | 16 ---- 30 files changed, 515 insertions(+), 843 deletions(-) delete mode 100644 tests/qemuxml2argvdata/disk-hostdev-scsi-virtio-iscsi-auth-AES.args delete mode 100644 tests/qemuxml2argvdata/disk-hostdev-scsi-virtio-iscsi-auth-AES.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi-auth.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi-auth.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-2.8.0.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-4.1.0.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-lsi.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-readonly.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-readonly.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi-auth.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi.args delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-iscsi.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.args rename tests/qemuxml2argvdata/{hostdev-scsi-virtio-iscsi-auth.args => hostdev-scsi-virtio-scsi.x86_64-2.8.0.args} (52%) create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-4.1.0.args create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-virtio-scsi.x86_64-latest.args delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-lsi-iscsi-auth.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-lsi-iscsi.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-readonly.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-virtio-iscsi-auth.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-virtio-iscsi.xml
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal
participants (2)
-
Michal Privoznik
-
Peter Krempa