Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVM: Skip test cases not supporting TDX #3523

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions microsoft/testsuites/cpu/cpusuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down
13 changes: 12 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 All @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading