[PATCH 1/2] cputest: Adapt scripts to split cpu_map

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

 



The tests/cputestdata/cpu-parse.sh script has been broken since the
cpu_map.xml file was split into several XMLs.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 tests/cputestdata/cpu-cpuid.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/cputestdata/cpu-cpuid.py b/tests/cputestdata/cpu-cpuid.py
index c45118512d..9ee83e0cd2 100755
--- a/tests/cputestdata/cpu-cpuid.py
+++ b/tests/cputestdata/cpu-cpuid.py
@@ -301,15 +301,13 @@ def parseFeature(data):
 
 def parseMap():
     path = os.path.dirname(sys.argv[0])
-    path = os.path.join(path, "..", "..", "src", "cpu", "cpu_map.xml")
+    path = os.path.join(path, "..", "..", "src", "cpu_map", "x86_features.xml")
     with open(path, "r") as f:
         data = xmltodict.parse(f)
 
     cpuMap = {}
-    for arch in data["cpus"]["arch"]:
-        if arch["@name"] == "x86":
-            for feature in arch["feature"]:
-                cpuMap[feature["@name"]] = parseFeature(feature["cpuid"])
+    for feature in data["cpus"]["feature"]:
+        cpuMap[feature["@name"]] = parseFeature(feature["cpuid"])
 
     return cpuMap
 
-- 
2.20.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]

  Powered by Linux