Skip to content

Commit

Permalink
Run CLH testcases with MS Guest Kernel (#2952)
Browse files Browse the repository at this point in the history
We have made corresponding changes in MS CLH to use
MS Guest kernel. We need to set env var USE_MS_GUEST_KERNEL=YES
in order to run integration/perf test with MS Guest kernel
instead of upstream guest kernel.

This change will pass the env var if set so from testing infra
while running the integration/perf testcase.

Signed-off-by: Smit Gardhariya <[email protected]>
  • Loading branch information
smit-gardhariya authored Sep 14, 2023
1 parent 382da3d commit 7396cbd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions microsoft/testsuites/cloud_hypervisor/ch_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ def _set_ms_clh_param(self, variables: Dict[str, Any]) -> None:
# Get GUEST VM type, set default to NON-CVM
clh_guest_vm_type = variables.get("clh_guest_vm_type", "NON-CVM")

# Check if MS Guest kernel need to be used
# Dom0 VHD is shipped with it now
# Default, we will use upstream guest kernel only
use_ms_guest_kernel = variables.get("use_ms_guest_kernel", "NO")

if not ms_access_token:
raise SkippedException("Access Token is needed while using MS-CLH")
if not ms_clh_repo:
Expand All @@ -207,6 +212,7 @@ def _set_ms_clh_param(self, variables: Dict[str, Any]) -> None:
CloudHypervisorTests.ms_clh_repo = ms_clh_repo
CloudHypervisorTests.ms_igvm_parser_repo = ms_igvm_parser_repo
CloudHypervisorTests.clh_guest_vm_type = clh_guest_vm_type
CloudHypervisorTests.use_ms_guest_kernel = use_ms_guest_kernel


def get_test_list(variables: Dict[str, Any], var1: str, var2: str) -> Any:
Expand Down
2 changes: 2 additions & 0 deletions microsoft/testsuites/cloud_hypervisor/ch_tests_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class CloudHypervisorTests(Tool):
use_ms_clh_repo = False
ms_access_token = ""
clh_guest_vm_type = ""
use_ms_guest_kernel = ""

cmd_path: PurePath
repo_root: PurePath
Expand Down Expand Up @@ -234,6 +235,7 @@ def _install(self) -> bool:
auth_token=self.ms_access_token,
)
self.env_vars["GUEST_VM_TYPE"] = self.clh_guest_vm_type
self.env_vars["USE_MS_GUEST_KERNEL"] = self.use_ms_guest_kernel
else:
git.clone(self.upstream_repo, clone_path)

Expand Down

0 comments on commit 7396cbd

Please sign in to comment.