To demonstrate the move of these attributes from -drive to -device.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
.../disk-error-policy-s390x.s390x-2.12.0.args | 42 ++++++++++++++++++
.../disk-error-policy-s390x.s390x-latest.args | 43 +++++++++++++++++++
.../disk-error-policy-s390x.xml | 37 ++++++++++++++++
tests/qemuxml2argvtest.c | 2 +
4 files changed, 124 insertions(+)
create mode 100644 tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-2.12.0.args
create mode 100644 tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-error-policy-s390x.xml
diff --git a/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-2.12.0.args b/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-2.12.0.args
new file mode 100644
index 0000000000..cf932d1fad
--- /dev/null
+++ b/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-2.12.0.args
@@ -0,0 +1,42 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-s390x \
+-name guest=guest,debug-threads=on \
+-S \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-guest/master-key.aes \
+-machine s390-ccw-virtio-2.12,accel=tcg,usb=off,dump-guest-core=off \
+-m 214 \
+-realtime mlock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-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 \
+-boot strict=on \
+-drive file=/var/images/image1,format=qcow2,if=none,id=drive-virtio-disk0,\
+werror=stop,rerror=stop,cache=none \
+-device virtio-blk-ccw,scsi=off,devno=fe.0.0000,drive=drive-virtio-disk0,\
+id=virtio-disk0,bootindex=1,write-cache=on \
+-drive file=/var/images/image2,format=qcow2,if=none,id=drive-virtio-disk1,\
+werror=enospc,cache=none \
+-device virtio-blk-ccw,scsi=off,devno=fe.0.0001,drive=drive-virtio-disk1,\
+id=virtio-disk1,write-cache=on \
+-drive file=/var/images/image3,format=qcow2,if=none,id=drive-virtio-disk2,\
+werror=report,rerror=ignore,cache=none \
+-device virtio-blk-ccw,scsi=off,devno=fe.0.0002,drive=drive-virtio-disk2,\
+id=virtio-disk2,write-cache=on \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-latest.args b/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-latest.args
new file mode 100644
index 0000000000..7daddc1d87
--- /dev/null
+++ b/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-latest.args
@@ -0,0 +1,43 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-s390x \
+-name guest=guest,debug-threads=on \
+-S \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-guest/master-key.aes \
+-machine s390-ccw-virtio,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu \
+-m 214 \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-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 \
+-boot strict=on \
+-drive file=/var/images/image1,format=qcow2,if=none,id=drive-virtio-disk0,\
+werror=stop,rerror=stop,cache=none \
+-device virtio-blk-ccw,scsi=off,devno=fe.0.0000,drive=drive-virtio-disk0,\
+id=virtio-disk0,bootindex=1,write-cache=on \
+-drive file=/var/images/image2,format=qcow2,if=none,id=drive-virtio-disk1,\
+werror=enospc,cache=none \
+-device virtio-blk-ccw,scsi=off,devno=fe.0.0001,drive=drive-virtio-disk1,\
+id=virtio-disk1,write-cache=on \
+-drive file=/var/images/image3,format=qcow2,if=none,id=drive-virtio-disk2,\
+werror=report,rerror=ignore,cache=none \
+-device virtio-blk-ccw,scsi=off,devno=fe.0.0002,drive=drive-virtio-disk2,\
+id=virtio-disk2,write-cache=on \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-error-policy-s390x.xml b/tests/qemuxml2argvdata/disk-error-policy-s390x.xml
new file mode 100644
index 0000000000..7149e66d70
--- /dev/null
+++ b/tests/qemuxml2argvdata/disk-error-policy-s390x.xml
@@ -0,0 +1,37 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='s390x' machine='s390-ccw-virtio'>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-s390x</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2' cache='none' error_policy='stop'/>
+ <source file='/var/images/image1'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2' cache='none' error_policy='enospace'/>
+ <source file='/var/images/image2'/>
+ <target dev='vdb' bus='virtio'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2' cache='none' error_policy='report' rerror_policy='ignore'/>
+ <source file='/var/images/image3'/>
+ <target dev='vdc' bus='virtio'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
+ </disk>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 4d44286b5a..596dd7a8ac 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1054,6 +1054,8 @@ mymain(void)
DO_TEST("disk-error-policy", NONE);
DO_TEST_CAPS_VER("disk-error-policy", "2.12.0");
DO_TEST_CAPS_LATEST("disk-error-policy");
+ DO_TEST_CAPS_ARCH_VER("disk-error-policy-s390x", "s390x", "2.12.0");
+ DO_TEST_CAPS_ARCH_LATEST("disk-error-policy-s390x", "s390x");
DO_TEST_CAPS_VER("disk-cache", "1.5.3");
DO_TEST_CAPS_VER("disk-cache", "2.6.0");
DO_TEST_CAPS_VER("disk-cache", "2.7.0");
--
2.25.1
© 2016 - 2024 Red Hat, Inc.