On 4/30/19 11:51 PM, Daniel Henrique Barboza wrote:
tests/virhostdevtest.c implements a function called
'virHostdevHostSupportsPassthroughKVM', that is equal to
'qemuHostdevHostSupportsPassthroughLegacy' that is declared
inside qemu/qemu_hostdev.c.

This patch removes the duplicated code from both files and
and puts it inside util/virhostdev.c, under the name
virHostdev...KVM, which represents what the code does better
than using 'Legacy'.

In fact, I'd rather see the function dropped from the tests completely. It's checking if the host the test us run on supports device assignment, but we're using pcimock to emulate all PCI detach/attach. The test should not be host dependent. It can still be architecture/OS dependent though (e.g. tehre's no sysfs on FreeBSD).

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to