From d1873e03b461c6a8535e338aa6869ece757fded3 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Tue, 27 Apr 2021 10:25:03 +0200 Subject: [PATCH] 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 --- 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 "