Skip to content
Permalink
Browse files

tests: add vhost-user-gpu xml2argv tests

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
  • Loading branch information...
elmarco committed Jul 12, 2018
1 parent 93e1fa3 commit 85cee18f65a7e80fc7322b9a05cc7fc569daf8e1
@@ -0,0 +1,33 @@
LC_ALL=C \
PATH=/bin \
HOME=/home/test \
USER=test \
LOGNAME=test \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-i686 \
-name QEMUGuest1 \
-S \
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
-m 214 \
-smp 1,sockets=1,cores=1,threads=1 \
-object memory-backend-memfd,id=ram-node0,share=yes,size=224395264 \
-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-no-acpi \
-usb \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
-chardev socket,id=chr-vu-video0,fd=0 \
-object vhost-user-backend,id=vu-video0,chardev=chr-vu-video0 \
-chardev socket,id=chr-vu-video1,fd=0 \
-object vhost-user-backend,id=vu-video1,chardev=chr-vu-video1 \
-device vhost-user-vga,id=video0,max_outputs=1,vhost-user=vu-video0,bus=pci.0,addr=0x2 \
-device vhost-user-gpu-pci,id=video1,max_outputs=1,vhost-user=vu-video1,bus=pci.0,addr=0x4 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
@@ -0,0 +1,44 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219136</memory>
<currentMemory unit='KiB'>219136</currentMemory>
<memoryBacking>
<access mode='shared'/>
<source type='memfd'/>
</memoryBacking>
<vcpu placement='static'>1</vcpu>
<cpu>
<numa>
<cell id='0' cpus='0' memory='219136' unit='KiB'/>
</numa>
</cpu>
<os>
<type arch='i686' machine='pc'>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-i686</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<memballoon model='virtio'/>
<video>
<model type='vhost-user' heads='1'/>
</video>
<video>
<model type='vhost-user' heads='1'/>
</video>
</devices>
</domain>
@@ -0,0 +1,30 @@
LC_ALL=C \
PATH=/bin \
HOME=/home/test \
USER=test \
LOGNAME=test \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-i686 \
-name QEMUGuest1 \
-S \
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
-m 214 \
-smp 1,sockets=1,cores=1,threads=1 \
-object memory-backend-memfd,id=ram-node0,share=yes,size=224395264 \
-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-no-acpi \
-usb \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
-chardev socket,id=chr-vu-video0,fd=0 \
-object vhost-user-backend,id=vu-video0,chardev=chr-vu-video0 \
-device vhost-user-vga,id=video0,max_outputs=1,vhost-user=vu-video0,bus=pci.0,addr=0x2 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
@@ -0,0 +1,41 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219136</memory>
<currentMemory unit='KiB'>219136</currentMemory>
<memoryBacking>
<access mode='shared'/>
<source type='memfd'/>
</memoryBacking>
<vcpu placement='static'>1</vcpu>
<cpu>
<numa>
<cell id='0' cpus='0' memory='219136' unit='KiB'/>
</numa>
</cpu>
<os>
<type arch='i686' machine='pc'>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-i686</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<memballoon model='virtio'/>
<video>
<model type='vhost-user' heads='1'/>
</video>
</devices>
</domain>
@@ -3008,6 +3008,18 @@ mymain(void)
DO_TEST("riscv64-virt",
QEMU_CAPS_DEVICE_VIRTIO_MMIO);

DO_TEST("vhost-user-vga",
QEMU_CAPS_OBJECT_MEMORY_MEMFD,
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
QEMU_CAPS_DEVICE_VHOST_USER_GPU,
QEMU_CAPS_DEVICE_VHOST_USER_VGA);

DO_TEST("vhost-user-gpu-secondary",
QEMU_CAPS_OBJECT_MEMORY_MEMFD,
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
QEMU_CAPS_DEVICE_VHOST_USER_GPU,
QEMU_CAPS_DEVICE_VHOST_USER_VGA);

if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
virFileDeleteTree(fakerootdir);

0 comments on commit 85cee18

Please sign in to comment.
You can’t perform that action at this time.