]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: mock qemuInterfaceOpenVhostNet
authorJán Tomko <jtomko@redhat.com>
Tue, 17 Apr 2018 10:11:17 +0000 (12:11 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 17 Apr 2018 12:02:09 +0000 (14:02 +0200)
commit31413101a80f91cb76a28fee59299ee0774bb618
tree3ae5689b394cc6dd0d7ef8a75ebd574312774fc2
parent374777ee74e43c60dfccc13b8555a033311a3646
tests: mock qemuInterfaceOpenVhostNet

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@redhat.com>
Reported-by: Jiří Denemark <jdenemar@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
tests/qemuxml2argvdata/user-aliases.args
tests/qemuxml2argvmock.c