diff mbox series

[2/2] test: Implement virConnectListAllNodeDevices

Message ID 5acbdcd616caf430445683c401137e24ebfd5439.1519427518.git.crobinso@redhat.com
State Superseded
Headers show
Series test: Implement virConnectListAllNodeDevices | expand

Commit Message

Cole Robinson Feb. 23, 2018, 11:16 p.m. UTC
Signed-off-by: Cole Robinson <crobinso@redhat.com>

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

-- 
2.14.3

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

Comments

John Ferlan March 2, 2018, 9:05 p.m. UTC | #1
On 02/23/2018 06:16 PM, Cole Robinson wrote:
> Signed-off-by: Cole Robinson <crobinso@redhat.com>

> ---

>  src/test/test_driver.c | 13 +++++++++++++

>  1 file changed, 13 insertions(+)

> 

> diff --git a/src/test/test_driver.c b/src/test/test_driver.c

> index 39784c9fa..844e99dd7 100644

> --- a/src/test/test_driver.c

> +++ b/src/test/test_driver.c

> @@ -5385,6 +5385,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)

> @@ -7022,6 +7034,7 @@ static virStorageDriver testStorageDriver = {

>  };

>  

>  static virNodeDeviceDriver testNodeDeviceDriver = {

> +    .connectListAllNodeDevices = testConnectListAllNodeDevices, /* 4.1.0 */


At least 4.2.0 now

Reviewed-by: John Ferlan <jferlan@redhat.com>


John

>      .connectNodeDeviceEventRegisterAny = testConnectNodeDeviceEventRegisterAny, /* 2.2.0 */

>      .connectNodeDeviceEventDeregisterAny = testConnectNodeDeviceEventDeregisterAny, /* 2.2.0 */

>      .nodeNumOfDevices = testNodeNumOfDevices, /* 0.7.2 */

> 


--
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 39784c9fa..844e99dd7 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -5385,6 +5385,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)
@@ -7022,6 +7034,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 */