[PATCH v3 5/7] virConnectGetCPUModelNames: 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 | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index f9eee44..fb4c1d9 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -54,6 +54,7 @@
 #include "virtypedparam.h"
 #include "virrandom.h"
 #include "virstring.h"
+#include "cpu/cpu.h"
 
 #define VIR_FROM_THIS VIR_FROM_TEST
 
@@ -5801,6 +5802,15 @@ testDomainScreenshot(virDomainPtr dom ATTRIBUTE_UNUSED,
     return ret;
 }
 
+static int
+testConnectGetCPUModelNames(virConnectPtr conn ATTRIBUTE_UNUSED,
+                            const char *arch,
+                            char ***models,
+                            unsigned int flags)
+{
+    virCheckFlags(0, -1);
+    return cpuGetModels(arch, models);
+}
 
 static virDriver testDriver = {
     .no = VIR_DRV_TEST,
@@ -5872,6 +5882,7 @@ static virDriver testDriver = {
     .connectIsAlive = testConnectIsAlive, /* 0.9.8 */
     .nodeGetCPUMap = testNodeGetCPUMap, /* 1.0.0 */
     .domainScreenshot = testDomainScreenshot, /* 1.0.5 */
+    .connectGetCPUModelNames = testConnectGetCPUModelNames, /* 1.1.3 */
 };
 
 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]