[PATCH 4/5] cpu_models: add the support for the test protocol

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

 



Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx>
---
 src/test/test_driver.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index d7b2e40..9b73532 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -5801,6 +5801,21 @@ testDomainScreenshot(virDomainPtr dom ATTRIBUTE_UNUSED,
     return ret;
 }
 
+static int
+testConnectGetCPUModelNames(virConnectPtr conn ATTRIBUTE_UNUSED,
+                            const char *arch ATTRIBUTE_UNUSED,
+                            char ***models,
+                            unsigned int flags)
+{
+    char **null_list;
+
+    virCheckFlags(0, -1);
+    if (VIR_ALLOC_N(null_list, 1) < 0)
+        return -1;
+
+    *models = null_list;
+    return 0;
+}
 
 static virDriver testDriver = {
     .no = VIR_DRV_TEST,
@@ -5872,6 +5887,7 @@ static virDriver testDriver = {
     .connectIsAlive = testConnectIsAlive, /* 0.9.8 */
     .nodeGetCPUMap = testNodeGetCPUMap, /* 1.0.0 */
     .domainScreenshot = testDomainScreenshot, /* 1.0.5 */
+    .connectGetCPUModelNames = testConnectGetCPUModelNames, /* 1.1.2 */
 };
 
 static virNetworkDriver testNetworkDriver = {
-- 
1.8.3.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]