From 50b4f364768d45e4902688473620e6914b63527d Mon Sep 17 00:00:00 2001 From: Kameron Carr Date: Thu, 14 Nov 2024 15:49:56 -0800 Subject: [PATCH 1/2] cvm_attestation: Skip Intel processors Based on the test case description and steps, it looks like it is only designed to run on SEV-SNP, not on TDX or SGX SKUs. This matches test failure observations --- microsoft/testsuites/cvm/cvm_attestation.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/microsoft/testsuites/cvm/cvm_attestation.py b/microsoft/testsuites/cvm/cvm_attestation.py index 9c5fd68eb7..5c390a862f 100644 --- a/microsoft/testsuites/cvm/cvm_attestation.py +++ b/microsoft/testsuites/cvm/cvm_attestation.py @@ -16,7 +16,8 @@ from lisa.operating_system import Ubuntu from lisa.sut_orchestrator import AZURE from lisa.testsuite import TestResult, simple_requirement -from lisa.tools import Ls +from lisa.tools import Ls, Lscpu +from lisa.tools.lscpu import CpuType from lisa.util import SkippedException, UnsupportedDistroException from microsoft.testsuites.cvm.cvm_attestation_tool import ( AzureCVMAttestationTests, @@ -41,6 +42,11 @@ def before_case(self, log: Logger, **kwargs: Any) -> None: ) ) + if node.tools[Lscpu].get_cpu_type() != CpuType.AMD: + raise SkippedException( + "CVM attestation report supports only SEV-SNP (AMD) CPU." + ) + @TestCaseMetadata( description=""" Runs get-snp-report tool to generate @@ -86,6 +92,11 @@ def before_case(self, log: Logger, **kwargs: Any) -> None: if not sev_guest_exists: raise SkippedException("/dev/sev-guest: Device Not Found") + if node.tools[Lscpu].get_cpu_type() != CpuType.AMD: + raise SkippedException( + "CVM attestation report supports only SEV-SNP (AMD) CPU." + ) + @TestCaseMetadata( description=""" Runs get-snp-report tool to generate From 224d8a04ce1b2ec5d3bbb64767a14128b611a8c7 Mon Sep 17 00:00:00 2001 From: Kameron Carr Date: Wed, 20 Nov 2024 17:46:00 -0800 Subject: [PATCH 2/2] CVM support verify_cpu_offline_channel_add --- microsoft/testsuites/cpu/cpusuite.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/microsoft/testsuites/cpu/cpusuite.py b/microsoft/testsuites/cpu/cpusuite.py index dc3e6d5bd7..5cc0790e42 100644 --- a/microsoft/testsuites/cpu/cpusuite.py +++ b/microsoft/testsuites/cpu/cpusuite.py @@ -19,7 +19,6 @@ simple_requirement, ) from lisa.environment import Environment -from lisa.features.security_profile import CvmDisabled from lisa.node import RemoteNode from lisa.tools import ( Ethtool, @@ -186,7 +185,6 @@ def verify_cpu_offline_network_workload( priority=4, requirement=simple_requirement( min_core_count=16, - supported_features=[CvmDisabled()], ), ) def verify_cpu_offline_channel_add(self, log: Logger, node: Node) -> None: