From: Tim Wiederhake Date: Tue, 27 Apr 2021 08:25:03 +0000 (+0200) Subject: cpu-data.py: Automatically adjust command line for kcpuid X-Git-Tag: v7.4.0-rc1~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1873e03b461c6a8535e338aa6869ece757fded3;p=thirdparty%2Flibvirt.git cpu-data.py: Automatically adjust command line for kcpuid kcpuid does not have a "-1" flag. Signed-off-by: Tim Wiederhake Reviewed-by: Michal Privoznik --- 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 "