1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-30 23:05:48 +00:00
libcpuid/tests/run_tests.py

159 lines
4.7 KiB
Python
Raw Normal View History

#!/usr/bin/env python3
import os, sys, re, random
### Constants:
delimiter = "-" * 80
fields_x86 = [ "architecture", "feature-level", "purpose", "family", "model", "stepping",
"extfamily", "extmodel", "cores", "logical",
"l1d-cache", "l1i-cache", "l2-cache", "l3-cache", "l4-cache",
"l1d-assoc", "l1i-assoc", "l2-assoc", "l3-assoc", "l4-assoc",
"l1d-cacheline", "l1i-cacheline", "l2-cacheline", "l3-cacheline", "l4-cacheline",
"l1d-instances", "l1i-instances", "l2-instances", "l3-instances", "l4-instances",
"sse-size", "codename", "flags" ]
fields_arm = [ "architecture", "feature-level", "purpose",
"implementer", "variant", "part-num", "revision",
"cores", "logical",
"codename", "flags" ]
args = sys.argv
fix = False
show_test_fast_warning = False
2014-07-16 07:10:51 +00:00
if len(args) < 3:
print("""
Usage: run_tests.py <cpuid_tool binary> <test file/dir> [test file/dir ...] [OPTIONS]
2014-07-16 07:10:51 +00:00
If a test file is given, it is tested by itself.
If a directory is given, process all *.test files there, subdirectories included.
If the --fix option is given, the behaviour of the cpuid_tool binary is deemed correct
and any failing tests are updated.
""")
sys.exit(1)
2014-07-16 07:10:51 +00:00
filelist = []
cpuid_tool = args[1]
for arg in args[2:]:
if arg == "--fix":
fix = True
continue
if arg == "--show-test-fast-warning":
show_test_fast_warning = True
continue
2014-07-16 07:10:51 +00:00
if os.path.isdir(arg):
# gather all *.test files from subdirs amd and intel:
for dirpath, dirnames, filenames in os.walk(arg):
filelist += [os.path.join(dirpath, fn) for fn in filenames if fn[-5:] == ".test"]
else:
filelist.append(arg)
#f = open(args[1], "rt")
#lines = f.readlines()
#f.close()
# One would usually use os.tempnam, but libc gives off hell a lot of
# warnings when you attempt to use that :(
def make_tempname(prefix):
chars = ""
for i in range(26):
chars += chr(97+i)
chars += chr(65+i)
for i in range(10):
chars += chr(48+i)
for i in range(6):
prefix += random.choice(chars)
return prefix
def fmt_error(err):
pfix = " %s: " % err[0]
return "%sexpected `%s'\n%sgot `%s'" % (pfix, err[1], " "*len(pfix), err[2])
def fixFile(filename, input_lines, output_lines):
f = open(filename, "wt")
f.writelines([s + "\n" for s in input_lines])
f.writelines([s + "\n" for s in output_lines])
f.close()
Support for hybrid CPU (#166) * Set CMAKE_C_FLAGS_DEBUG to display warnings during build CI workflows are reporting warnings. Adding more C flags here help to avoid that. * Add new types * Add set_cpu_affinity function * Add cpu_identify_all function * Add cpu_request_core_type function * Add cpuid_get_all_raw_data, cpuid_serialize_all_raw_data and cpuid_deserialize_all_raw_data functions * Detect hybrid architecture for Intel CPUs * Update cpuid_tool to detect all CPU logical cores * Rename tests subdirectories for Intel Core * Update all tests Since e4309a6c4bc3ad875711a1599cba01a205b3103e, new fields are reported by cpuid_tool * Add Intel Alder Lake Fix #157 * Remove convert_instlatx64.c This tool is not useful anymore because the cpuid_deserialize_raw_data_internal() function can natively parse them since 5667e1401c2ad50e1a79769d1f0334369aa44377 * Fix affinity_mask computation * Define _GNU_SOURCE in configure.ac Forgotten in 4f80964db5bab011c1893ad17adcaec20d6d7fae * Use dynamic raw array in cpu_raw_data_array_t * Add cpu_affinity_mask_t type * Improve set_cpu_affinity function - Print a warning if logical CPU number is not supported on operating system - Return a boolean value in case of success instead of an integer * Improve cpu_identify_all and cpu_request_core_type functions * Use dynamic array for cpu_types in system_id_t This commit also adds cleanups, fixes and consistency * Tests: update Ryzen 5 Matisse with all CPU cores * Add affinity_mask_str_r function and address other comments - Fixed cpuid_grow_raw_data_array and cpu_raw_data_array_t.logical_cpu_t with the correct type - Added a note about hard limit of cpu_raw_data_array_t - Fixed a typo in cpuid_deserialize_raw_data_internal * Fix build on Windows
2022-09-15 16:37:08 +00:00
def do_test(inp, expected_out, binary, test_file_name, num_cpu_type):
fninp = make_tempname("cpuidin")
fnoutp = make_tempname("cpuidout")
f = open(fninp, "wt")
f.writelines([s + "\n" for s in inp])
f.close()
architecture = os.popen("%s --load=%s --architecture" % (binary, fninp)).read().splitlines()[-1]
if architecture == "x86":
fields = fields_x86
elif architecture == "ARM":
fields = fields_arm
else:
fields = []
cmd = "%s --load=%s --outfile=%s %s" % (binary, fninp, fnoutp, " ".join(["--" + s for s in fields]))
os.system(cmd)
os.unlink(fninp)
real_out = []
try:
f = open(fnoutp, "rt")
Support for hybrid CPU (#166) * Set CMAKE_C_FLAGS_DEBUG to display warnings during build CI workflows are reporting warnings. Adding more C flags here help to avoid that. * Add new types * Add set_cpu_affinity function * Add cpu_identify_all function * Add cpu_request_core_type function * Add cpuid_get_all_raw_data, cpuid_serialize_all_raw_data and cpuid_deserialize_all_raw_data functions * Detect hybrid architecture for Intel CPUs * Update cpuid_tool to detect all CPU logical cores * Rename tests subdirectories for Intel Core * Update all tests Since e4309a6c4bc3ad875711a1599cba01a205b3103e, new fields are reported by cpuid_tool * Add Intel Alder Lake Fix #157 * Remove convert_instlatx64.c This tool is not useful anymore because the cpuid_deserialize_raw_data_internal() function can natively parse them since 5667e1401c2ad50e1a79769d1f0334369aa44377 * Fix affinity_mask computation * Define _GNU_SOURCE in configure.ac Forgotten in 4f80964db5bab011c1893ad17adcaec20d6d7fae * Use dynamic raw array in cpu_raw_data_array_t * Add cpu_affinity_mask_t type * Improve set_cpu_affinity function - Print a warning if logical CPU number is not supported on operating system - Return a boolean value in case of success instead of an integer * Improve cpu_identify_all and cpu_request_core_type functions * Use dynamic array for cpu_types in system_id_t This commit also adds cleanups, fixes and consistency * Tests: update Ryzen 5 Matisse with all CPU cores * Add affinity_mask_str_r function and address other comments - Fixed cpuid_grow_raw_data_array and cpu_raw_data_array_t.logical_cpu_t with the correct type - Added a note about hard limit of cpu_raw_data_array_t - Fixed a typo in cpuid_deserialize_raw_data_internal * Fix build on Windows
2022-09-15 16:37:08 +00:00
for s in f.readlines():
if delimiter not in s:
Support for hybrid CPU (#166) * Set CMAKE_C_FLAGS_DEBUG to display warnings during build CI workflows are reporting warnings. Adding more C flags here help to avoid that. * Add new types * Add set_cpu_affinity function * Add cpu_identify_all function * Add cpu_request_core_type function * Add cpuid_get_all_raw_data, cpuid_serialize_all_raw_data and cpuid_deserialize_all_raw_data functions * Detect hybrid architecture for Intel CPUs * Update cpuid_tool to detect all CPU logical cores * Rename tests subdirectories for Intel Core * Update all tests Since e4309a6c4bc3ad875711a1599cba01a205b3103e, new fields are reported by cpuid_tool * Add Intel Alder Lake Fix #157 * Remove convert_instlatx64.c This tool is not useful anymore because the cpuid_deserialize_raw_data_internal() function can natively parse them since 5667e1401c2ad50e1a79769d1f0334369aa44377 * Fix affinity_mask computation * Define _GNU_SOURCE in configure.ac Forgotten in 4f80964db5bab011c1893ad17adcaec20d6d7fae * Use dynamic raw array in cpu_raw_data_array_t * Add cpu_affinity_mask_t type * Improve set_cpu_affinity function - Print a warning if logical CPU number is not supported on operating system - Return a boolean value in case of success instead of an integer * Improve cpu_identify_all and cpu_request_core_type functions * Use dynamic array for cpu_types in system_id_t This commit also adds cleanups, fixes and consistency * Tests: update Ryzen 5 Matisse with all CPU cores * Add affinity_mask_str_r function and address other comments - Fixed cpuid_grow_raw_data_array and cpu_raw_data_array_t.logical_cpu_t with the correct type - Added a note about hard limit of cpu_raw_data_array_t - Fixed a typo in cpuid_deserialize_raw_data_internal * Fix build on Windows
2022-09-15 16:37:08 +00:00
real_out.append(s.strip())
f.close()
os.unlink(fnoutp)
except IOError:
return "Exception"
Support for hybrid CPU (#166) * Set CMAKE_C_FLAGS_DEBUG to display warnings during build CI workflows are reporting warnings. Adding more C flags here help to avoid that. * Add new types * Add set_cpu_affinity function * Add cpu_identify_all function * Add cpu_request_core_type function * Add cpuid_get_all_raw_data, cpuid_serialize_all_raw_data and cpuid_deserialize_all_raw_data functions * Detect hybrid architecture for Intel CPUs * Update cpuid_tool to detect all CPU logical cores * Rename tests subdirectories for Intel Core * Update all tests Since e4309a6c4bc3ad875711a1599cba01a205b3103e, new fields are reported by cpuid_tool * Add Intel Alder Lake Fix #157 * Remove convert_instlatx64.c This tool is not useful anymore because the cpuid_deserialize_raw_data_internal() function can natively parse them since 5667e1401c2ad50e1a79769d1f0334369aa44377 * Fix affinity_mask computation * Define _GNU_SOURCE in configure.ac Forgotten in 4f80964db5bab011c1893ad17adcaec20d6d7fae * Use dynamic raw array in cpu_raw_data_array_t * Add cpu_affinity_mask_t type * Improve set_cpu_affinity function - Print a warning if logical CPU number is not supported on operating system - Return a boolean value in case of success instead of an integer * Improve cpu_identify_all and cpu_request_core_type functions * Use dynamic array for cpu_types in system_id_t This commit also adds cleanups, fixes and consistency * Tests: update Ryzen 5 Matisse with all CPU cores * Add affinity_mask_str_r function and address other comments - Fixed cpuid_grow_raw_data_array and cpu_raw_data_array_t.logical_cpu_t with the correct type - Added a note about hard limit of cpu_raw_data_array_t - Fixed a typo in cpuid_deserialize_raw_data_internal * Fix build on Windows
2022-09-15 16:37:08 +00:00
if len(real_out) != len(expected_out) or len(real_out) != len(fields) * num_cpu_type:
if fix:
fixFile(test_file_name, inp, real_out)
return "Number of records, fixed."
else:
return "Unexpected number of records returned\n - expected length %d\n - real length %d\n - %d fields" % (len(expected_out), len(real_out), len(fields) * num_cpu_type)
err_fields = []
for i in range(len(real_out)):
if real_out[i] != expected_out[i]:
Support for hybrid CPU (#166) * Set CMAKE_C_FLAGS_DEBUG to display warnings during build CI workflows are reporting warnings. Adding more C flags here help to avoid that. * Add new types * Add set_cpu_affinity function * Add cpu_identify_all function * Add cpu_request_core_type function * Add cpuid_get_all_raw_data, cpuid_serialize_all_raw_data and cpuid_deserialize_all_raw_data functions * Detect hybrid architecture for Intel CPUs * Update cpuid_tool to detect all CPU logical cores * Rename tests subdirectories for Intel Core * Update all tests Since e4309a6c4bc3ad875711a1599cba01a205b3103e, new fields are reported by cpuid_tool * Add Intel Alder Lake Fix #157 * Remove convert_instlatx64.c This tool is not useful anymore because the cpuid_deserialize_raw_data_internal() function can natively parse them since 5667e1401c2ad50e1a79769d1f0334369aa44377 * Fix affinity_mask computation * Define _GNU_SOURCE in configure.ac Forgotten in 4f80964db5bab011c1893ad17adcaec20d6d7fae * Use dynamic raw array in cpu_raw_data_array_t * Add cpu_affinity_mask_t type * Improve set_cpu_affinity function - Print a warning if logical CPU number is not supported on operating system - Return a boolean value in case of success instead of an integer * Improve cpu_identify_all and cpu_request_core_type functions * Use dynamic array for cpu_types in system_id_t This commit also adds cleanups, fixes and consistency * Tests: update Ryzen 5 Matisse with all CPU cores * Add affinity_mask_str_r function and address other comments - Fixed cpuid_grow_raw_data_array and cpu_raw_data_array_t.logical_cpu_t with the correct type - Added a note about hard limit of cpu_raw_data_array_t - Fixed a typo in cpuid_deserialize_raw_data_internal * Fix build on Windows
2022-09-15 16:37:08 +00:00
err_fields.append((fields[i % len(fields)], expected_out[i], real_out[i]))
if not err_fields:
return "OK"
else:
if fix:
fixFile(test_file_name, inp, real_out)
return "Mismatch, fixed."
else:
return "Mismatch in fields:\n%s" % "\n".join([fmt_error(err) for err in err_fields])
errors = False
print("Testing...")
2014-07-16 07:10:51 +00:00
for test_file_name in filelist:
Support for hybrid CPU (#166) * Set CMAKE_C_FLAGS_DEBUG to display warnings during build CI workflows are reporting warnings. Adding more C flags here help to avoid that. * Add new types * Add set_cpu_affinity function * Add cpu_identify_all function * Add cpu_request_core_type function * Add cpuid_get_all_raw_data, cpuid_serialize_all_raw_data and cpuid_deserialize_all_raw_data functions * Detect hybrid architecture for Intel CPUs * Update cpuid_tool to detect all CPU logical cores * Rename tests subdirectories for Intel Core * Update all tests Since e4309a6c4bc3ad875711a1599cba01a205b3103e, new fields are reported by cpuid_tool * Add Intel Alder Lake Fix #157 * Remove convert_instlatx64.c This tool is not useful anymore because the cpuid_deserialize_raw_data_internal() function can natively parse them since 5667e1401c2ad50e1a79769d1f0334369aa44377 * Fix affinity_mask computation * Define _GNU_SOURCE in configure.ac Forgotten in 4f80964db5bab011c1893ad17adcaec20d6d7fae * Use dynamic raw array in cpu_raw_data_array_t * Add cpu_affinity_mask_t type * Improve set_cpu_affinity function - Print a warning if logical CPU number is not supported on operating system - Return a boolean value in case of success instead of an integer * Improve cpu_identify_all and cpu_request_core_type functions * Use dynamic array for cpu_types in system_id_t This commit also adds cleanups, fixes and consistency * Tests: update Ryzen 5 Matisse with all CPU cores * Add affinity_mask_str_r function and address other comments - Fixed cpuid_grow_raw_data_array and cpu_raw_data_array_t.logical_cpu_t with the correct type - Added a note about hard limit of cpu_raw_data_array_t - Fixed a typo in cpuid_deserialize_raw_data_internal * Fix build on Windows
2022-09-15 16:37:08 +00:00
num_cpu_type = 0
2014-07-16 07:10:51 +00:00
current_input = []
current_output = []
build_output = False
with open(test_file_name, "rt") as f:
for line in f.readlines():
Support for hybrid CPU (#166) * Set CMAKE_C_FLAGS_DEBUG to display warnings during build CI workflows are reporting warnings. Adding more C flags here help to avoid that. * Add new types * Add set_cpu_affinity function * Add cpu_identify_all function * Add cpu_request_core_type function * Add cpuid_get_all_raw_data, cpuid_serialize_all_raw_data and cpuid_deserialize_all_raw_data functions * Detect hybrid architecture for Intel CPUs * Update cpuid_tool to detect all CPU logical cores * Rename tests subdirectories for Intel Core * Update all tests Since e4309a6c4bc3ad875711a1599cba01a205b3103e, new fields are reported by cpuid_tool * Add Intel Alder Lake Fix #157 * Remove convert_instlatx64.c This tool is not useful anymore because the cpuid_deserialize_raw_data_internal() function can natively parse them since 5667e1401c2ad50e1a79769d1f0334369aa44377 * Fix affinity_mask computation * Define _GNU_SOURCE in configure.ac Forgotten in 4f80964db5bab011c1893ad17adcaec20d6d7fae * Use dynamic raw array in cpu_raw_data_array_t * Add cpu_affinity_mask_t type * Improve set_cpu_affinity function - Print a warning if logical CPU number is not supported on operating system - Return a boolean value in case of success instead of an integer * Improve cpu_identify_all and cpu_request_core_type functions * Use dynamic array for cpu_types in system_id_t This commit also adds cleanups, fixes and consistency * Tests: update Ryzen 5 Matisse with all CPU cores * Add affinity_mask_str_r function and address other comments - Fixed cpuid_grow_raw_data_array and cpu_raw_data_array_t.logical_cpu_t with the correct type - Added a note about hard limit of cpu_raw_data_array_t - Fixed a typo in cpuid_deserialize_raw_data_internal * Fix build on Windows
2022-09-15 16:37:08 +00:00
line = line.strip()
if line == delimiter:
2014-07-16 07:10:51 +00:00
build_output = True
Support for hybrid CPU (#166) * Set CMAKE_C_FLAGS_DEBUG to display warnings during build CI workflows are reporting warnings. Adding more C flags here help to avoid that. * Add new types * Add set_cpu_affinity function * Add cpu_identify_all function * Add cpu_request_core_type function * Add cpuid_get_all_raw_data, cpuid_serialize_all_raw_data and cpuid_deserialize_all_raw_data functions * Detect hybrid architecture for Intel CPUs * Update cpuid_tool to detect all CPU logical cores * Rename tests subdirectories for Intel Core * Update all tests Since e4309a6c4bc3ad875711a1599cba01a205b3103e, new fields are reported by cpuid_tool * Add Intel Alder Lake Fix #157 * Remove convert_instlatx64.c This tool is not useful anymore because the cpuid_deserialize_raw_data_internal() function can natively parse them since 5667e1401c2ad50e1a79769d1f0334369aa44377 * Fix affinity_mask computation * Define _GNU_SOURCE in configure.ac Forgotten in 4f80964db5bab011c1893ad17adcaec20d6d7fae * Use dynamic raw array in cpu_raw_data_array_t * Add cpu_affinity_mask_t type * Improve set_cpu_affinity function - Print a warning if logical CPU number is not supported on operating system - Return a boolean value in case of success instead of an integer * Improve cpu_identify_all and cpu_request_core_type functions * Use dynamic array for cpu_types in system_id_t This commit also adds cleanups, fixes and consistency * Tests: update Ryzen 5 Matisse with all CPU cores * Add affinity_mask_str_r function and address other comments - Fixed cpuid_grow_raw_data_array and cpu_raw_data_array_t.logical_cpu_t with the correct type - Added a note about hard limit of cpu_raw_data_array_t - Fixed a typo in cpuid_deserialize_raw_data_internal * Fix build on Windows
2022-09-15 16:37:08 +00:00
num_cpu_type += 1
2014-07-16 07:10:51 +00:00
else:
if build_output:
Support for hybrid CPU (#166) * Set CMAKE_C_FLAGS_DEBUG to display warnings during build CI workflows are reporting warnings. Adding more C flags here help to avoid that. * Add new types * Add set_cpu_affinity function * Add cpu_identify_all function * Add cpu_request_core_type function * Add cpuid_get_all_raw_data, cpuid_serialize_all_raw_data and cpuid_deserialize_all_raw_data functions * Detect hybrid architecture for Intel CPUs * Update cpuid_tool to detect all CPU logical cores * Rename tests subdirectories for Intel Core * Update all tests Since e4309a6c4bc3ad875711a1599cba01a205b3103e, new fields are reported by cpuid_tool * Add Intel Alder Lake Fix #157 * Remove convert_instlatx64.c This tool is not useful anymore because the cpuid_deserialize_raw_data_internal() function can natively parse them since 5667e1401c2ad50e1a79769d1f0334369aa44377 * Fix affinity_mask computation * Define _GNU_SOURCE in configure.ac Forgotten in 4f80964db5bab011c1893ad17adcaec20d6d7fae * Use dynamic raw array in cpu_raw_data_array_t * Add cpu_affinity_mask_t type * Improve set_cpu_affinity function - Print a warning if logical CPU number is not supported on operating system - Return a boolean value in case of success instead of an integer * Improve cpu_identify_all and cpu_request_core_type functions * Use dynamic array for cpu_types in system_id_t This commit also adds cleanups, fixes and consistency * Tests: update Ryzen 5 Matisse with all CPU cores * Add affinity_mask_str_r function and address other comments - Fixed cpuid_grow_raw_data_array and cpu_raw_data_array_t.logical_cpu_t with the correct type - Added a note about hard limit of cpu_raw_data_array_t - Fixed a typo in cpuid_deserialize_raw_data_internal * Fix build on Windows
2022-09-15 16:37:08 +00:00
current_output.append(line)
2014-07-16 07:10:51 +00:00
else:
Support for hybrid CPU (#166) * Set CMAKE_C_FLAGS_DEBUG to display warnings during build CI workflows are reporting warnings. Adding more C flags here help to avoid that. * Add new types * Add set_cpu_affinity function * Add cpu_identify_all function * Add cpu_request_core_type function * Add cpuid_get_all_raw_data, cpuid_serialize_all_raw_data and cpuid_deserialize_all_raw_data functions * Detect hybrid architecture for Intel CPUs * Update cpuid_tool to detect all CPU logical cores * Rename tests subdirectories for Intel Core * Update all tests Since e4309a6c4bc3ad875711a1599cba01a205b3103e, new fields are reported by cpuid_tool * Add Intel Alder Lake Fix #157 * Remove convert_instlatx64.c This tool is not useful anymore because the cpuid_deserialize_raw_data_internal() function can natively parse them since 5667e1401c2ad50e1a79769d1f0334369aa44377 * Fix affinity_mask computation * Define _GNU_SOURCE in configure.ac Forgotten in 4f80964db5bab011c1893ad17adcaec20d6d7fae * Use dynamic raw array in cpu_raw_data_array_t * Add cpu_affinity_mask_t type * Improve set_cpu_affinity function - Print a warning if logical CPU number is not supported on operating system - Return a boolean value in case of success instead of an integer * Improve cpu_identify_all and cpu_request_core_type functions * Use dynamic array for cpu_types in system_id_t This commit also adds cleanups, fixes and consistency * Tests: update Ryzen 5 Matisse with all CPU cores * Add affinity_mask_str_r function and address other comments - Fixed cpuid_grow_raw_data_array and cpu_raw_data_array_t.logical_cpu_t with the correct type - Added a note about hard limit of cpu_raw_data_array_t - Fixed a typo in cpuid_deserialize_raw_data_internal * Fix build on Windows
2022-09-15 16:37:08 +00:00
current_input.append(line)
2014-07-16 07:10:51 +00:00
#codename = current_output[len(current_output) - 2]
Support for hybrid CPU (#166) * Set CMAKE_C_FLAGS_DEBUG to display warnings during build CI workflows are reporting warnings. Adding more C flags here help to avoid that. * Add new types * Add set_cpu_affinity function * Add cpu_identify_all function * Add cpu_request_core_type function * Add cpuid_get_all_raw_data, cpuid_serialize_all_raw_data and cpuid_deserialize_all_raw_data functions * Detect hybrid architecture for Intel CPUs * Update cpuid_tool to detect all CPU logical cores * Rename tests subdirectories for Intel Core * Update all tests Since e4309a6c4bc3ad875711a1599cba01a205b3103e, new fields are reported by cpuid_tool * Add Intel Alder Lake Fix #157 * Remove convert_instlatx64.c This tool is not useful anymore because the cpuid_deserialize_raw_data_internal() function can natively parse them since 5667e1401c2ad50e1a79769d1f0334369aa44377 * Fix affinity_mask computation * Define _GNU_SOURCE in configure.ac Forgotten in 4f80964db5bab011c1893ad17adcaec20d6d7fae * Use dynamic raw array in cpu_raw_data_array_t * Add cpu_affinity_mask_t type * Improve set_cpu_affinity function - Print a warning if logical CPU number is not supported on operating system - Return a boolean value in case of success instead of an integer * Improve cpu_identify_all and cpu_request_core_type functions * Use dynamic array for cpu_types in system_id_t This commit also adds cleanups, fixes and consistency * Tests: update Ryzen 5 Matisse with all CPU cores * Add affinity_mask_str_r function and address other comments - Fixed cpuid_grow_raw_data_array and cpu_raw_data_array_t.logical_cpu_t with the correct type - Added a note about hard limit of cpu_raw_data_array_t - Fixed a typo in cpuid_deserialize_raw_data_internal * Fix build on Windows
2022-09-15 16:37:08 +00:00
result = do_test(current_input, current_output, cpuid_tool, test_file_name, num_cpu_type)
print("Test [%s]: %s" % (test_file_name[:-5], result))
2014-07-16 07:10:51 +00:00
if result != "OK":
errors = True
build_output = False
if errors:
if show_test_fast_warning:
print("""
You're running tests in fast mode; before taking any action on the errors
above, please confirm that the slow mode ('make test-old') also fails.""")
sys.exit(1)
else:
print("All successfull!")
sys.exit(0)