[PATCH 3/7] cpu-data.py: Properly handle aliases

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

 



The script is used to create data files for cputest from QEMU replies.
By ignoring aliases we might end up thinking a feature is not enabled by
QEMU just because its name differs from the primary one in the CPU map.

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

diff --git a/tests/cputestdata/cpu-data.py b/tests/cputestdata/cpu-data.py
index 37fb2e3791..b280eed436 100755
--- a/tests/cputestdata/cpu-data.py
+++ b/tests/cputestdata/cpu-data.py
@@ -457,6 +457,11 @@ def parseMap():
         for reg in _KEYS[data.tag] + _REGS[data.tag]:
             feature[reg] = int(data.attrib.get(reg, "0"), 0)
         cpuMap[f.attrib["name"]] = feature
+
+        for alias in f.iterfind("alias"):
+            if alias.attrib["source"] == "qemu":
+                cpuMap[alias.attrib["name"]] = feature
+
     return cpuMap
 
 
-- 
2.46.2




[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