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
This commit is contained in:
Kameron Carr 2024-11-14 15:49:56 -08:00
Родитель 6c43900023
Коммит cad387641a
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -16,7 +16,8 @@ from lisa.features.security_profile import CvmEnabled
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,
@ -61,6 +62,10 @@ class AzureCVMAttestationTestSuite(TestSuite):
result: TestResult,
variables: Dict[str, Any],
) -> None:
if node.tools[Lscpu].get_cpu_type() != CpuType.AMD:
raise SkippedException(
"CVM attestation report supports only SEV-SNP (AMD) CPU."
)
node.tools[AzureCVMAttestationTests].run_cvm_attestation(
result,
environment,
@ -105,6 +110,10 @@ class NestedCVMAttestationTestSuite(TestSuite):
result: TestResult,
variables: Dict[str, Any],
) -> None:
if node.tools[Lscpu].get_cpu_type() != CpuType.AMD:
raise SkippedException(
"CVM attestation report supports only SEV-SNP (AMD) CPU."
)
host_data = variables.get("host_data", "")
if not host_data:
raise SkippedException("host_data is empty")