[libvirt] [PATCH] tests: mock qemuInterfaceOpenVhostNet

Martin Kletzander mkletzan at redhat.com
Tue Apr 17 11:53:41 UTC 2018


On Tue, Apr 17, 2018 at 12:29:32PM +0200, Ján Tomko wrote:
>This functions contains logic that tries to use vhost for virtio
>interfaces, even if <driver name='vhost'/> was not supplied.
>In this case, a failure is non-fatal.
>
>On my system, /dev/vhost-net was not accessible to the user running
>'make check', but we should not depend on that.
>
>Mock it to prevent accessing /dev/vhost-net and return some predictable
>file descriptor numbers instead.
>
>Introduced by commit c1f684e - deprecate QEMU_CAPS_VHOST_NET.
>
>Signed-off-by: Ján Tomko <jtomko at redhat.com>
>Reported-by: Jiří Denemark <jdenemar at redhat.com>
>---
> tests/qemuxml2argvdata/user-aliases.args |  2 +-
> tests/qemuxml2argvmock.c                 | 19 +++++++++++++++++++
> 2 files changed, 20 insertions(+), 1 deletion(-)
>

Reviewed-by: Martin Kletzander <mkletzan at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180417/7166047c/attachment-0001.sig>


More information about the libvir-list mailing list