From: Peter Krempa <[email protected]> Initialize the chardev backends for vhost-user graphics to use real FDs.
Signed-off-by: Peter Krempa <[email protected]> --- .../vhost-user-gpu-secondary.x86_64-latest.args | 4 ++-- tests/qemuxmlconfdata/vhost-user-vga.x86_64-latest.args | 2 +- .../virtio-options-video-ats.x86_64-latest.args | 4 ++-- .../virtio-options-video-iommu.x86_64-latest.args | 4 ++-- .../virtio-options-video-packed.x86_64-latest.args | 4 ++-- tests/qemuxmlconfdata/virtio-options.x86_64-latest.args | 2 +- tests/qemuxmlconftest.c | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/qemuxmlconfdata/vhost-user-gpu-secondary.x86_64-latest.args b/tests/qemuxmlconfdata/vhost-user-gpu-secondary.x86_64-latest.args index 96f6e67aa8..7e684d2965 100644 --- a/tests/qemuxmlconfdata/vhost-user-gpu-secondary.x86_64-latest.args +++ b/tests/qemuxmlconfdata/vhost-user-gpu-secondary.x86_64-latest.args @@ -31,9 +31,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \ -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \ -audiodev '{"id":"audio1","driver":"none"}' \ --chardev socket,id=chr-vu-video0,fd=XXXXXXX \ +-chardev socket,id=chr-vu-video0,fd=@vhost-user-video-fd@ \ -device '{"driver":"vhost-user-vga","id":"video0","max_outputs":1,"chardev":"chr-vu-video0","bus":"pci.0","addr":"0x2"}' \ --chardev socket,id=chr-vu-video1,fd=XXXXXXX \ +-chardev socket,id=chr-vu-video1,fd=@vhost-user-video-fd@ \ -device '{"driver":"vhost-user-gpu-pci","id":"video1","max_outputs":1,"chardev":"chr-vu-video1","bus":"pci.0","addr":"0x4"}' \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ diff --git a/tests/qemuxmlconfdata/vhost-user-vga.x86_64-latest.args b/tests/qemuxmlconfdata/vhost-user-vga.x86_64-latest.args index 4ddc6ad65c..59ce629b40 100644 --- a/tests/qemuxmlconfdata/vhost-user-vga.x86_64-latest.args +++ b/tests/qemuxmlconfdata/vhost-user-vga.x86_64-latest.args @@ -31,7 +31,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \ -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \ -audiodev '{"id":"audio1","driver":"none"}' \ --chardev socket,id=chr-vu-video0,fd=XXXXXXX \ +-chardev socket,id=chr-vu-video0,fd=@vhost-user-video-fd@ \ -device '{"driver":"vhost-user-vga","id":"video0","max_outputs":1,"chardev":"chr-vu-video0","bus":"pci.0","addr":"0x2"}' \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ diff --git a/tests/qemuxmlconfdata/virtio-options-video-ats.x86_64-latest.args b/tests/qemuxmlconfdata/virtio-options-video-ats.x86_64-latest.args index 3b6e9e43af..7d9f9832c0 100644 --- a/tests/qemuxmlconfdata/virtio-options-video-ats.x86_64-latest.args +++ b/tests/qemuxmlconfdata/virtio-options-video-ats.x86_64-latest.args @@ -28,9 +28,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ --chardev socket,id=chr-vu-video0,fd=XXXXXXX \ +-chardev socket,id=chr-vu-video0,fd=@vhost-user-video-fd@ \ -device '{"driver":"vhost-user-vga","id":"video0","max_outputs":1,"chardev":"chr-vu-video0","bus":"pci.0","addr":"0x2"}' \ --chardev socket,id=chr-vu-video1,fd=XXXXXXX \ +-chardev socket,id=chr-vu-video1,fd=@vhost-user-video-fd@ \ -device '{"driver":"vhost-user-gpu-pci","ats":false,"id":"video1","max_outputs":1,"chardev":"chr-vu-video1","bus":"pci.0","addr":"0x3"}' \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x4"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ diff --git a/tests/qemuxmlconfdata/virtio-options-video-iommu.x86_64-latest.args b/tests/qemuxmlconfdata/virtio-options-video-iommu.x86_64-latest.args index c37c260a7c..eb335a43be 100644 --- a/tests/qemuxmlconfdata/virtio-options-video-iommu.x86_64-latest.args +++ b/tests/qemuxmlconfdata/virtio-options-video-iommu.x86_64-latest.args @@ -28,9 +28,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ --chardev socket,id=chr-vu-video0,fd=XXXXXXX \ +-chardev socket,id=chr-vu-video0,fd=@vhost-user-video-fd@ \ -device '{"driver":"vhost-user-vga","id":"video0","max_outputs":1,"chardev":"chr-vu-video0","bus":"pci.0","addr":"0x2"}' \ --chardev socket,id=chr-vu-video1,fd=XXXXXXX \ +-chardev socket,id=chr-vu-video1,fd=@vhost-user-video-fd@ \ -device '{"driver":"vhost-user-gpu-pci","iommu_platform":false,"id":"video1","max_outputs":1,"chardev":"chr-vu-video1","bus":"pci.0","addr":"0x3"}' \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x4"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ diff --git a/tests/qemuxmlconfdata/virtio-options-video-packed.x86_64-latest.args b/tests/qemuxmlconfdata/virtio-options-video-packed.x86_64-latest.args index 9ef03eaa0f..aa4f382525 100644 --- a/tests/qemuxmlconfdata/virtio-options-video-packed.x86_64-latest.args +++ b/tests/qemuxmlconfdata/virtio-options-video-packed.x86_64-latest.args @@ -28,9 +28,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ --chardev socket,id=chr-vu-video0,fd=XXXXXXX \ +-chardev socket,id=chr-vu-video0,fd=@vhost-user-video-fd@ \ -device '{"driver":"vhost-user-vga","id":"video0","max_outputs":1,"chardev":"chr-vu-video0","bus":"pci.0","addr":"0x2"}' \ --chardev socket,id=chr-vu-video1,fd=XXXXXXX \ +-chardev socket,id=chr-vu-video1,fd=@vhost-user-video-fd@ \ -device '{"driver":"vhost-user-gpu-pci","packed":false,"id":"video1","max_outputs":1,"chardev":"chr-vu-video1","bus":"pci.0","addr":"0x3"}' \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x4"}' \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ diff --git a/tests/qemuxmlconfdata/virtio-options.x86_64-latest.args b/tests/qemuxmlconfdata/virtio-options.x86_64-latest.args index 4cb38ae04f..28a8fd0f03 100644 --- a/tests/qemuxmlconfdata/virtio-options.x86_64-latest.args +++ b/tests/qemuxmlconfdata/virtio-options.x86_64-latest.args @@ -45,7 +45,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ -device '{"driver":"virtio-tablet-pci","iommu_platform":true,"ats":true,"packed":true,"page-per-vq":true,"id":"input2","bus":"pci.0","addr":"0x11"}' \ -device '{"driver":"virtio-input-host-pci","iommu_platform":true,"ats":true,"packed":true,"page-per-vq":true,"id":"input3","evdev":"/dev/input/event1234","bus":"pci.0","addr":"0x12"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ --chardev socket,id=chr-vu-video0,fd=XXXXXXX \ +-chardev socket,id=chr-vu-video0,fd=@vhost-user-video-fd@ \ -device '{"driver":"vhost-user-vga","id":"video0","max_outputs":1,"chardev":"chr-vu-video0","bus":"pci.0","addr":"0x2"}' \ -device '{"driver":"virtio-balloon-pci","iommu_platform":true,"ats":true,"packed":true,"page-per-vq":true,"id":"balloon0","bus":"pci.0","addr":"0xc"}' \ -object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/random"}' \ diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index 80b1577475..ef071f5648 100644 --- a/tests/qemuxmlconftest.c +++ b/tests/qemuxmlconftest.c @@ -249,7 +249,7 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv, if (video->backend == VIR_DOMAIN_VIDEO_BACKEND_TYPE_VHOSTUSER) { qemuDomainVideoPrivate *vpriv = QEMU_DOMAIN_VIDEO_PRIVATE(video); - vpriv->vhost_user_fd = 1729; + vpriv->vhost_user_fd = virTestMakeDummyFD(g_strdup("@vhost-user-video-fd@")); } } -- 2.54.0
