Skip to content

Commit

Permalink
cvm_attestation: Skip Intel processors
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kamalca committed Nov 21, 2024
1 parent 9b1b352 commit 44d294c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion microsoft/testsuites/cvm/cvm_attestation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -61,6 +62,10 @@ def verify_azure_cvm_attestation_report(
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,
Expand Down Expand Up @@ -105,6 +110,10 @@ def verify_nested_cvm_attestation_report(
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")
Expand Down

0 comments on commit 44d294c

Please sign in to comment.