[libvirt PATCH 3/3] cpu-data.py: Automatically adjust command line for kcpuid

Tim Wiederhake twiederh at redhat.com
Tue Apr 27 08:25:03 UTC 2021


kcpuid does not have a "-1" flag.

Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
 tests/cputestdata/cpu-data.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/cputestdata/cpu-data.py b/tests/cputestdata/cpu-data.py
index 4305aacf35..d8a89ebc2a 100755
--- a/tests/cputestdata/cpu-data.py
+++ b/tests/cputestdata/cpu-data.py
@@ -116,7 +116,7 @@ def gather_cpuid_leaves(args):
     cpuid = args.path_to_cpuid or "cpuid"
     try:
         output = subprocess.check_output(
-            [cpuid, "-1r"],
+            [cpuid, "-r" if "kcpuid" in cpuid else "-1r"],
             universal_newlines=True)
     except FileNotFoundError as e:
         exit("Error: '{}' not found.\n'cpuid' can be usually found in a "
-- 
2.26.3




More information about the libvir-list mailing list