Skip to content

Commit 7da0436

Browse files
pb8ozulinx86
authored andcommitted
test: print all missing cpuid leafs in test_cpu_template_helper
So that we get a full picture of what the difference is when troubleshooting. Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
1 parent 32a5a25 commit 7da0436

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/integration_tests/functional/test_cpu_template_helper.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,13 @@ def test_cpu_config_dump_vs_actual(
265265

266266
# Compare CPUID between actual and dumped CPU config.
267267
# Verify all the actual CPUIDs are covered and match with the dumped one.
268+
keys_not_in_dump = {}
268269
for key, actual in actual_cpu_config["cpuid"].items():
269270
if (key[0], key[1]) in UNAVAILABLE_CPUID_ON_DUMP_LIST:
270271
continue
272+
if key not in dump_cpu_config["cpuid"]:
273+
keys_not_in_dump[key] = actual_cpu_config["cpuid"][key]
274+
continue
271275
dump = dump_cpu_config["cpuid"][key]
272276

273277
if key in CPUID_EXCEPTION_LIST:
@@ -278,6 +282,8 @@ def test_cpu_config_dump_vs_actual(
278282
f"{actual=:#034b} vs. {dump=:#034b}"
279283
)
280284

285+
assert len(keys_not_in_dump) == 0
286+
281287
# Verify all CPUID on the dumped CPU config are covered in actual one.
282288
for key, dump in dump_cpu_config["cpuid"].items():
283289
actual = actual_cpu_config["cpuid"].get(key)

0 commit comments

Comments
 (0)