mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
xlconfigtest: add test for channel conversion
Signed-off-by: Joao Martins <joao.m.martins@oracle.com> Acked-by: Jim Fehlig <jfehlig@suse.com> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
parent
9a683f8892
commit
bff2f781ab
13
tests/xlconfigdata/test-channel-pty.cfg
Normal file
13
tests/xlconfigdata/test-channel-pty.cfg
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
name = "XenGuest1"
|
||||||
|
uuid = "45b60f51-88a9-47a8-a3b3-5e66d71b2283"
|
||||||
|
maxmem = 512
|
||||||
|
memory = 512
|
||||||
|
vcpus = 1
|
||||||
|
localtime = 0
|
||||||
|
on_poweroff = "preserve"
|
||||||
|
on_reboot = "restart"
|
||||||
|
on_crash = "preserve"
|
||||||
|
vif = [ "mac=5a:36:0e:be:00:09" ]
|
||||||
|
bootloader = "/usr/bin/pygrub"
|
||||||
|
disk = [ "format=qcow2,vdev=xvda,access=rw,backendtype=qdisk,target=/var/lib/xen/images/debian/disk.qcow2" ]
|
||||||
|
channel = [ "connection=pty,name=org.qemu.guest_agent.0" ]
|
33
tests/xlconfigdata/test-channel-pty.xml
Normal file
33
tests/xlconfigdata/test-channel-pty.xml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<domain type='xen'>
|
||||||
|
<name>XenGuest1</name>
|
||||||
|
<uuid>45b60f51-88a9-47a8-a3b3-5e66d71b2283</uuid>
|
||||||
|
<memory unit='KiB'>524288</memory>
|
||||||
|
<currentMemory unit='KiB'>524288</currentMemory>
|
||||||
|
<vcpu placement='static'>1</vcpu>
|
||||||
|
<bootloader>/usr/bin/pygrub</bootloader>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='xenpv'>linux</type>
|
||||||
|
</os>
|
||||||
|
<clock offset='utc' adjustment='reset'/>
|
||||||
|
<on_poweroff>preserve</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>preserve</on_crash>
|
||||||
|
<devices>
|
||||||
|
<disk type='file' device='disk'>
|
||||||
|
<driver name='qemu' type='qcow2'/>
|
||||||
|
<source file='/var/lib/xen/images/debian/disk.qcow2'/>
|
||||||
|
<target dev='xvda' bus='xen'/>
|
||||||
|
</disk>
|
||||||
|
<interface type='ethernet'>
|
||||||
|
<mac address='5a:36:0e:be:00:09'/>
|
||||||
|
</interface>
|
||||||
|
<console type='pty'>
|
||||||
|
<target type='xen' port='0'/>
|
||||||
|
</console>
|
||||||
|
<channel type='pty'>
|
||||||
|
<target type='xen' name='org.qemu.guest_agent.0'/>
|
||||||
|
</channel>
|
||||||
|
<input type='mouse' bus='xen'/>
|
||||||
|
<input type='keyboard' bus='xen'/>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
13
tests/xlconfigdata/test-channel-unix.cfg
Normal file
13
tests/xlconfigdata/test-channel-unix.cfg
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
name = "XenGuest1"
|
||||||
|
uuid = "45b60f51-88a9-47a8-a3b3-5e66d71b2283"
|
||||||
|
maxmem = 512
|
||||||
|
memory = 512
|
||||||
|
vcpus = 1
|
||||||
|
localtime = 0
|
||||||
|
on_poweroff = "preserve"
|
||||||
|
on_reboot = "restart"
|
||||||
|
on_crash = "preserve"
|
||||||
|
vif = [ "mac=5a:36:0e:be:00:09" ]
|
||||||
|
bootloader = "/usr/bin/pygrub"
|
||||||
|
disk = [ "format=qcow2,vdev=xvda,access=rw,backendtype=qdisk,target=/var/lib/xen/images/debian/disk.qcow2" ]
|
||||||
|
channel = [ "connection=socket,path=/path/to/socket,name=org.qemu.guest_agent.0" ]
|
34
tests/xlconfigdata/test-channel-unix.xml
Normal file
34
tests/xlconfigdata/test-channel-unix.xml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<domain type='xen'>
|
||||||
|
<name>XenGuest1</name>
|
||||||
|
<uuid>45b60f51-88a9-47a8-a3b3-5e66d71b2283</uuid>
|
||||||
|
<memory unit='KiB'>524288</memory>
|
||||||
|
<currentMemory unit='KiB'>524288</currentMemory>
|
||||||
|
<vcpu placement='static'>1</vcpu>
|
||||||
|
<bootloader>/usr/bin/pygrub</bootloader>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='xenpv'>linux</type>
|
||||||
|
</os>
|
||||||
|
<clock offset='utc' adjustment='reset'/>
|
||||||
|
<on_poweroff>preserve</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>preserve</on_crash>
|
||||||
|
<devices>
|
||||||
|
<disk type='file' device='disk'>
|
||||||
|
<driver name='qemu' type='qcow2'/>
|
||||||
|
<source file='/var/lib/xen/images/debian/disk.qcow2'/>
|
||||||
|
<target dev='xvda' bus='xen'/>
|
||||||
|
</disk>
|
||||||
|
<interface type='ethernet'>
|
||||||
|
<mac address='5a:36:0e:be:00:09'/>
|
||||||
|
</interface>
|
||||||
|
<console type='pty'>
|
||||||
|
<target type='xen' port='0'/>
|
||||||
|
</console>
|
||||||
|
<channel type='unix'>
|
||||||
|
<source mode='bind' path='/path/to/socket'/>
|
||||||
|
<target type='xen' name='org.qemu.guest_agent.0'/>
|
||||||
|
</channel>
|
||||||
|
<input type='mouse' bus='xen'/>
|
||||||
|
<input type='keyboard' bus='xen'/>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
@ -268,6 +268,10 @@ mymain(void)
|
|||||||
DO_TEST_FORMAT("paravirt-cmdline-bogus-extra-root", false);
|
DO_TEST_FORMAT("paravirt-cmdline-bogus-extra-root", false);
|
||||||
DO_TEST("rbd-multihost-noauth");
|
DO_TEST("rbd-multihost-noauth");
|
||||||
|
|
||||||
|
#ifdef LIBXL_HAVE_DEVICE_CHANNEL
|
||||||
|
DO_TEST("channel-pty");
|
||||||
|
DO_TEST("channel-unix");
|
||||||
|
#endif
|
||||||
#ifdef LIBXL_HAVE_BUILDINFO_SERIAL_LIST
|
#ifdef LIBXL_HAVE_BUILDINFO_SERIAL_LIST
|
||||||
DO_TEST("fullvirt-multiserial");
|
DO_TEST("fullvirt-multiserial");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user