S390: Testcase for console default target type (virtio)

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>
This commit is contained in:
Viktor Mihajlovski 2013-06-17 16:17:36 +02:00 committed by Ján Tomko
parent f542a0dead
commit 38dc212296
3 changed files with 46 additions and 0 deletions

View File

@ -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>

View File

@ -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>

View File

@ -300,6 +300,8 @@ mymain(void)
DO_TEST_DIFFERENT("hostdev-scsi-autogen-address"); DO_TEST_DIFFERENT("hostdev-scsi-autogen-address");
DO_TEST_DIFFERENT("s390-defaultconsole");
virObjectUnref(driver.caps); virObjectUnref(driver.caps);
virObjectUnref(driver.xmlopt); virObjectUnref(driver.xmlopt);