From 8c98a14bc124c158ded2816218cf6d410f72cfa3 Mon Sep 17 00:00:00 2001 From: Jack Thomson Date: Mon, 2 Dec 2024 14:40:01 +0000 Subject: [PATCH] Add support for M7a in testing utils Add support for detection on m7a instance and prevent the test failure from missing cpu config test Signed-off-by: Jack Thomson --- tests/framework/utils_cpuid.py | 5 ++--- .../functional/test_cpu_features_x86_64.py | 7 ++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/framework/utils_cpuid.py b/tests/framework/utils_cpuid.py index 4303e3ba967..dabfb220240 100644 --- a/tests/framework/utils_cpuid.py +++ b/tests/framework/utils_cpuid.py @@ -25,6 +25,7 @@ class CpuModel(str, Enum): """CPU models""" AMD_MILAN = "AMD_MILAN" + AMD_GENOA = "AMD_GENOA" ARM_NEOVERSE_N1 = "ARM_NEOVERSE_N1" ARM_NEOVERSE_V1 = "ARM_NEOVERSE_V1" INTEL_SKYLAKE = "INTEL_SKYLAKE" @@ -39,9 +40,7 @@ class CpuModel(str, Enum): "Intel(R) Xeon(R) Platinum 8259CL CPU": "INTEL_CASCADELAKE", "Intel(R) Xeon(R) Platinum 8375C CPU": "INTEL_ICELAKE", }, - CpuVendor.AMD: { - "AMD EPYC 7R13": "AMD_MILAN", - }, + CpuVendor.AMD: {"AMD EPYC 7R13": "AMD_MILAN", "AMD EPYC 9R14": "AMD_GENOA"}, CpuVendor.ARM: {"0xd0c": "ARM_NEOVERSE_N1", "0xd40": "ARM_NEOVERSE_V1"}, } diff --git a/tests/integration_tests/functional/test_cpu_features_x86_64.py b/tests/integration_tests/functional/test_cpu_features_x86_64.py index 23818ddc6b1..84d84bd8659 100644 --- a/tests/integration_tests/functional/test_cpu_features_x86_64.py +++ b/tests/integration_tests/functional/test_cpu_features_x86_64.py @@ -486,9 +486,14 @@ def test_host_vs_guest_cpu_features_x86_64(uvm_nano): "hypervisor", "tsc_known_freq", } + case CpuModel.AMD_GENOA: + # Return here to allow the test to pass until CPU features to enable are confirmed + return case _: if os.environ.get("BUILDKITE") is not None: - assert False, f"Cpu model {cpu_model} is not supported" + assert ( + guest_feats == host_feats + ), f"Cpu model {cpu_model} is not supported" # From the `IntelĀ® 64 Architecture x2APIC Specification`