
On 11/20/2015 10:35 PM, Laine Stump wrote:
On 11/14/2015 03:37 AM, Shivaprasad G Bhat wrote:
The next few patches implement the vfio-pci tests. So, change the test case to test the negative test case on pciback instead.
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com> --- tests/virpcimock.c | 2 +- tests/virpcitest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/virpcimock.c b/tests/virpcimock.c index 0b49290..0724a36 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -815,7 +815,7 @@ init_env(void) MAKE_PCI_DRIVER("iwlwifi", 0x8086, 0x0044); MAKE_PCI_DRIVER("i915", 0x8086, 0x0046, 0x8086, 0x0047); MAKE_PCI_DRIVER("pci-stub", -1, -1); - pci_driver_new("vfio-pci", PCI_ACTION_BIND, -1, -1); + pci_driver_new("pciback", PCI_ACTION_BIND, -1, -1);
Is there a specific reason for making this the name of a stub driver that we support in the real driver, but not in the test driver? Or would the test be served just as well with some other random name?
I dont see why vfio-pci was chosen for negative test case earlier . I chose pciback because none of the existing test cases target this driver. So, felt safe to choose this driver for the negative test case. I think we can even choose a random test driver. Thanks, Shiva
Or, maybe we really do want it to be vfio-pci so that we will test failure paths when the driver is vfio-pci.
Either way, I'm not certain that changing this to "pciback" is the right thing. (not certain that it *isn't* either, which is why I Cc'ed jdenemar :-)
# define MAKE_PCI_DEVICE(Id, Vendor, Device, ...) \ do { \ diff --git a/tests/virpcitest.c b/tests/virpcitest.c index d4d3253..25591f9 100644 --- a/tests/virpcitest.c +++ b/tests/virpcitest.c @@ -269,7 +269,7 @@ testVirPCIDeviceDetachFail(const void *opaque) if (!dev) goto cleanup; - if (virPCIDeviceSetStubDriver(dev, "vfio-pci") < 0) + if (virPCIDeviceSetStubDriver(dev, "pciback") < 0) goto cleanup; if (virPCIDeviceDetach(dev, NULL, NULL) < 0) {
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list