]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
S390: Testcase for console default target type (virtio)
authorViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Mon, 17 Jun 2013 14:17:36 +0000 (16:17 +0200)
committerJán Tomko <jtomko@redhat.com>
Fri, 28 Jun 2013 07:52:00 +0000 (09:52 +0200)
For s390 the default console target type is virtio. This also requires
that an implicit virtio-serial controller is instantiated.
This testcase verifies that the target type of virtio is correctly set
in the generated XML if no target element was given and that the
corresponding virtio-serial element is generated too.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
tests/qemuxml2argvdata/qemuxml2argv-s390-defaultconsole.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-defaultconsole.xml b/tests/qemuxml2argvdata/qemuxml2argv-s390-defaultconsole.xml
new file mode 100644 (file)
index 0000000..036027c
--- /dev/null
@@ -0,0 +1,20 @@
+<domain type='kvm'>
+  <name>test</name>
+  <uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
+  <memory unit='KiB'>262144</memory>
+  <currentMemory unit='KiB'>262144</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='s390x' machine='s390-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-kvm</emulator>
+    <console type='pty'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml
new file mode 100644 (file)
index 0000000..9a609f8
--- /dev/null
@@ -0,0 +1,24 @@
+<domain type='kvm'>
+  <name>test</name>
+  <uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
+  <memory unit='KiB'>262144</memory>
+  <currentMemory unit='KiB'>262144</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='s390x' machine='s390-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-kvm</emulator>
+    <controller type='usb' index='0' model='none'/>
+    <controller type='virtio-serial' index='0'/>
+    <console type='pty'>
+      <target type='virtio' port='0'/>
+    </console>
+    <memballoon model='none'/>
+  </devices>
+</domain>
index 06e4206b74b6be55874e01b7bbea7b422939e85d..65e95911472a129baa4ae392974dbb3c23f53b72 100644 (file)
@@ -300,6 +300,8 @@ mymain(void)
 
     DO_TEST_DIFFERENT("hostdev-scsi-autogen-address");
 
+    DO_TEST_DIFFERENT("s390-defaultconsole");
+
     virObjectUnref(driver.caps);
     virObjectUnref(driver.xmlopt);