[PATCH v1 02/10] Revert "virpcitest: Test virPCIDeviceDetach failure"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michal Privoznik <mprivozn@xxxxxxxxxx>

This reverts commit b70c093ffa00cd87c8d39d3652b798f033a81faf.

In next commit the virpcimock is going to be extended and thus
binding a PCI device to vfio-pci driver will finally succeed.
Remove this test as it will no longer make sense.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 tests/virpcitest.c | 32 --------------------------------
 1 file changed, 32 deletions(-)

diff --git a/tests/virpcitest.c b/tests/virpcitest.c
index 961a7eff1a..9ecd1b7d27 100644
--- a/tests/virpcitest.c
+++ b/tests/virpcitest.c
@@ -256,36 +256,6 @@ testVirPCIDeviceDetachSingle(const void *opaque)
     return ret;
 }
 
-static int
-testVirPCIDeviceDetachFail(const void *opaque)
-{
-    const struct testPCIDevData *data = opaque;
-    int ret = -1;
-    virPCIDevicePtr dev;
-
-    dev = virPCIDeviceNew(data->domain, data->bus, data->slot, data->function);
-    if (!dev)
-        goto cleanup;
-
-    virPCIDeviceSetStubDriver(dev, VIR_PCI_STUB_DRIVER_VFIO);
-
-    if (virPCIDeviceDetach(dev, NULL, NULL) < 0) {
-        if (virTestGetVerbose() || virTestGetDebug())
-            virDispatchError(NULL);
-        virResetLastError();
-        ret = 0;
-    } else {
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       "Attaching device %s to %s should have failed",
-                       virPCIDeviceGetName(dev),
-                       virPCIStubDriverTypeToString(VIR_PCI_STUB_DRIVER_VFIO));
-    }
-
- cleanup:
-    virPCIDeviceFree(dev);
-    return ret;
-}
-
 static int
 testVirPCIDeviceReattachSingle(const void *opaque)
 {
@@ -421,8 +391,6 @@ mymain(void)
     DO_TEST_PCI(testVirPCIDeviceIsAssignable, 5, 0x90, 1, 0);
     DO_TEST_PCI(testVirPCIDeviceIsAssignable, 1, 1, 0, 0);
 
-    DO_TEST_PCI(testVirPCIDeviceDetachFail, 0, 0x0a, 1, 0);
-
     /* Reattach a device already bound to non-stub a driver */
     DO_TEST_PCI_DRIVER(0, 0x0a, 1, 0, "i915");
     DO_TEST_PCI(testVirPCIDeviceReattachSingle, 0, 0x0a, 1, 0);
-- 
2.20.1

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux