Skip to content

Commit 36470da

Browse files
kamalcaLiliDeng
authored andcommitted
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
1 parent f908ae2 commit 36470da

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

microsoft/testsuites/cvm/cvm_attestation.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
from lisa.operating_system import Ubuntu
1717
from lisa.sut_orchestrator import AZURE
1818
from lisa.testsuite import TestResult, simple_requirement
19-
from lisa.tools import Ls
19+
from lisa.tools import Ls, Lscpu
20+
from lisa.tools.lscpu import CpuType
2021
from lisa.util import SkippedException, UnsupportedDistroException
2122
from microsoft.testsuites.cvm.cvm_attestation_tool import (
2223
AzureCVMAttestationTests,
@@ -41,6 +42,11 @@ def before_case(self, log: Logger, **kwargs: Any) -> None:
4142
)
4243
)
4344

45+
if node.tools[Lscpu].get_cpu_type() != CpuType.AMD:
46+
raise SkippedException(
47+
"CVM attestation report supports only SEV-SNP (AMD) CPU."
48+
)
49+
4450
@TestCaseMetadata(
4551
description="""
4652
Runs get-snp-report tool to generate
@@ -86,6 +92,11 @@ def before_case(self, log: Logger, **kwargs: Any) -> None:
8692
if not sev_guest_exists:
8793
raise SkippedException("/dev/sev-guest: Device Not Found")
8894

95+
if node.tools[Lscpu].get_cpu_type() != CpuType.AMD:
96+
raise SkippedException(
97+
"CVM attestation report supports only SEV-SNP (AMD) CPU."
98+
)
99+
89100
@TestCaseMetadata(
90101
description="""
91102
Runs get-snp-report tool to generate

0 commit comments

Comments
 (0)