A test cases to test the virtio-gpu-ccw device.
Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
---
.../qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml | 18 ++++++++++
tests/qemuxml2argvdata/video-virtio-gpu-ccw.args | 25 ++++++++++++++
tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml | 35 +++++++++++++++++++
tests/qemuxml2argvtest.c | 7 ++++
.../video-virtio-gpu-ccw-auto.xml | 35 +++++++++++++++++++
tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml | 39 ++++++++++++++++++++++
tests/qemuxml2xmltest.c | 14 ++++++++
7 files changed, 173 insertions(+)
create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml
create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.args
create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml
create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml
create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml
diff --git a/tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml b/tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml
new file mode 100644
index 0000000..2d5da38
--- /dev/null
+++ b/tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml
@@ -0,0 +1,18 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1803</uuid>
+ <memory>219136</memory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+ </os>
+ <devices>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='virtio'/>
+ </disk>
+ <graphics type='vnc'/>
+ <panic model='s390'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/video-virtio-gpu-ccw.args b/tests/qemuxml2argvdata/video-virtio-gpu-ccw.args
new file mode 100644
index 0000000..e5e8854
--- /dev/null
+++ b/tests/qemuxml2argvdata/video-virtio-gpu-ccw.args
@@ -0,0 +1,25 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-s390x \
+-name QEMUGuest1 \
+-S \
+-M s390-ccw-virtio \
+-m 214 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1803 \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=readline \
+-boot c \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \
+-device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,\
+id=virtio-disk0 \
+-vnc 127.0.0.1:0 \
+-device virtio-gpu-ccw,id=video0,max_outputs=1,devno=fe.0.0002 \
+-device virtio-gpu-ccw,id=video1,max_outputs=1,devno=fe.0.0003 \
+-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0001
diff --git a/tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml b/tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml
new file mode 100644
index 0000000..b327595
--- /dev/null
+++ b/tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml
@@ -0,0 +1,35 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1803</uuid>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+ </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='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='virtio'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0'/>
+ </disk>
+ <memballoon model='virtio'>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x1'/>
+ </memballoon>
+ <graphics type='vnc'/>
+ <video>
+ <model type='virtio' heads='1' primary='yes'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
+ </video>
+ <video>
+ <model type='virtio' heads='1'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0003'/>
+ </video>
+ <panic model='s390'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index f6a90c2..d2a1df4 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -3007,6 +3007,13 @@ mymain(void)
DO_TEST("disk-many-format-probing", QEMU_CAPS_DRIVE_BOOT);
driver.config->allowDiskFormatProbing = false;
+ DO_TEST("video-virtio-gpu-ccw", QEMU_CAPS_VIRTIO_CCW,
+ QEMU_CAPS_DEVICE_VIRTIO_GPU,
+ QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
+ QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS,
+ QEMU_CAPS_VNC,
+ QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW);
+
if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
virFileDeleteTree(fakerootdir);
diff --git a/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml b/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml
new file mode 100644
index 0000000..b373275
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml
@@ -0,0 +1,35 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1803</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='block' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='virtio'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
+ </disk>
+ <graphics type='vnc' port='-1' autoport='yes'>
+ <listen type='address'/>
+ </graphics>
+ <video>
+ <model type='virtio' heads='1' primary='yes'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
+ </video>
+ <memballoon model='virtio'>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
+ </memballoon>
+ <panic model='s390'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml b/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml
new file mode 100644
index 0000000..d34be84
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml
@@ -0,0 +1,39 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1803</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='block' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='virtio'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
+ </disk>
+ <graphics type='vnc' port='-1' autoport='yes'>
+ <listen type='address'/>
+ </graphics>
+ <video>
+ <model type='virtio' heads='1' primary='yes'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
+ </video>
+ <video>
+ <model type='virtio' heads='1'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0003'/>
+ </video>
+ <memballoon model='virtio'>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
+ </memballoon>
+ <panic model='s390'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 28ba46e..0ea801b 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -1180,6 +1180,20 @@ mymain(void)
DO_TEST("video-qxl-heads", NONE);
DO_TEST("video-qxl-noheads", NONE);
DO_TEST("video-virtio-gpu-secondary", NONE);
+ DO_TEST("video-virtio-gpu-ccw",
+ QEMU_CAPS_VIRTIO_CCW,
+ QEMU_CAPS_DEVICE_VIRTIO_GPU,
+ QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
+ QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS,
+ QEMU_CAPS_VNC,
+ QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW);
+ DO_TEST("video-virtio-gpu-ccw-auto",
+ QEMU_CAPS_VIRTIO_CCW,
+ QEMU_CAPS_DEVICE_VIRTIO_GPU,
+ QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
+ QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS,
+ QEMU_CAPS_VNC,
+ QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW);
DO_TEST("intel-iommu",
QEMU_CAPS_DEVICE_INTEL_IOMMU);
--
2.7.4
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On Mon, Mar 19, 2018 at 02:35:31PM -0400, Farhan Ali wrote: >A test cases to test the virtio-gpu-ccw device. > >Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com> >Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com> >--- > .../qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml | 18 ++++++++++ > tests/qemuxml2argvdata/video-virtio-gpu-ccw.args | 25 ++++++++++++++ > tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml | 35 +++++++++++++++++++ > tests/qemuxml2argvtest.c | 7 ++++ > .../video-virtio-gpu-ccw-auto.xml | 35 +++++++++++++++++++ > tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml | 39 ++++++++++++++++++++++ > tests/qemuxml2xmltest.c | 14 ++++++++ > 7 files changed, 173 insertions(+) Test cases can be squashed into commits adding the functionality to demonstrate what it does and the rest should be added as early as possible to show that later patches do not break it. If I understand correctly: qemuxml2xml: -ccw.xml should work even as a first patch of the series (and since the only difference between the input and the output file is virtio-gpu unrelated, just taking the current output as the new input and symlinking the outfile should be enough) qemuxml2xml: -auto-ccw.xml belongs with the patch changing the default and the tests/qemuxml2argvtest.c and .args changes belong with the command line formatter Jan > create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml > create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.args > create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml > create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml > create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml > -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
On 03/22/2018 03:27 PM, Ján Tomko wrote: > On Mon, Mar 19, 2018 at 02:35:31PM -0400, Farhan Ali wrote: >> A test cases to test the virtio-gpu-ccw device. >> >> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com> >> Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com> >> --- >> .../qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml | 18 ++++++++++ >> tests/qemuxml2argvdata/video-virtio-gpu-ccw.args | 25 ++++++++++++++ >> tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml | 35 >> +++++++++++++++++++ >> tests/qemuxml2argvtest.c | 7 ++++ >> .../video-virtio-gpu-ccw-auto.xml | 35 >> +++++++++++++++++++ >> tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml | 39 >> ++++++++++++++++++++++ >> tests/qemuxml2xmltest.c | 14 ++++++++ >> 7 files changed, 173 insertions(+) > > Test cases can be squashed into commits adding the functionality to > demonstrate what it does and the rest should be added as early as > possible to show that later patches do not break it. > Understood and it makes sense. > If I understand correctly: > qemuxml2xml: -ccw.xml should work even as a first patch of the series > (and since the only difference between the input and the output file > is virtio-gpu unrelated, just taking the current output as the new > input and symlinking the outfile should be enough) Well the 'graphics' tag auto generates some default values, so symlink might not work. > qemuxml2xml: -auto-ccw.xml belongs with the patch changing the default > and the tests/qemuxml2argvtest.c and .args changes belong with the > command line formatter Okay, will change. > > Jan > >> create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml >> create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.args >> create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml >> create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml >> create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml >> > > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list > -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
© 2016 - 2025 Red Hat, Inc.