diff mbox series

[v2,2/2] test: Implement virConnectListAllNodeDevices

Message ID 34dec2cf3568a43193be17920ee37ca97a3dff21.1531259066.git.crobinso@redhat.com
State Accepted
Commit f52d5fc91c0b0cf29a2471fd4d5bf9b2d10abbea
Headers show
Series test: Implement virConnectListAllNodeDevices | expand

Commit Message

Cole Robinson July 10, 2018, 9:46 p.m. UTC
Signed-off-by: Cole Robinson <crobinso@redhat.com>

---
 src/test/test_driver.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

-- 
2.17.1

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

Patch

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 7374c83eaa..3bc79bf358 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -5381,6 +5381,18 @@  testNodeListDevices(virConnectPtr conn,
                                         cap, names, maxnames);
 }
 
+static int
+testConnectListAllNodeDevices(virConnectPtr conn,
+                              virNodeDevicePtr **devices,
+                              unsigned int flags)
+{
+    testDriverPtr driver = conn->privateData;
+
+    virCheckFlags(VIR_CONNECT_LIST_NODE_DEVICES_FILTERS_CAP, -1);
+
+    return virNodeDeviceObjListExport(conn, driver->devs, devices,
+                                      NULL, flags);
+}
 
 static virNodeDevicePtr
 testNodeDeviceLookupByName(virConnectPtr conn, const char *name)
@@ -7017,6 +7029,7 @@  static virStorageDriver testStorageDriver = {
 };
 
 static virNodeDeviceDriver testNodeDeviceDriver = {
+    .connectListAllNodeDevices = testConnectListAllNodeDevices, /* 4.1.0 */
     .connectNodeDeviceEventRegisterAny = testConnectNodeDeviceEventRegisterAny, /* 2.2.0 */
     .connectNodeDeviceEventDeregisterAny = testConnectNodeDeviceEventDeregisterAny, /* 2.2.0 */
     .nodeNumOfDevices = testNodeNumOfDevices, /* 0.7.2 */