[libvirt PATCH 07/10] tests: add fake host CPU for sparc architecture

Daniel P. Berrangé berrange at redhat.com
Wed Nov 18 17:39:50 UTC 2020


Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 tests/testutilshostcpus.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/testutilshostcpus.h b/tests/testutilshostcpus.h
index a54b181c09..91d9c153d9 100644
--- a/tests/testutilshostcpus.h
+++ b/tests/testutilshostcpus.h
@@ -130,6 +130,14 @@ static virCPUDef cpuS390Data = {
     .threads = 1,
 };
 
+static virCPUDef cpuSparcData = {
+    .type = VIR_CPU_TYPE_HOST,
+    .arch = VIR_ARCH_SPARC,
+    .sockets = 1,
+    .cores = 1,
+    .threads = 1,
+};
+
 static inline virCPUDefPtr
 testUtilsHostCpusGetDefForModel(const char *model)
 {
@@ -161,6 +169,8 @@ testUtilsHostCpusGetDefForArch(virArch arch)
         return virCPUDefCopy(&cpuS390Data);
     else if (arch == VIR_ARCH_AARCH64)
         return virCPUDefCopy(&cpuAarch64Data);
+    else if (arch == VIR_ARCH_SPARC)
+        return virCPUDefCopy(&cpuSparcData);
 
     return NULL;
 }
-- 
2.28.0




More information about the libvir-list mailing list