Skip to content

Commit

Permalink
tests: Enable tests for StratoVirt hypervisor
Browse files Browse the repository at this point in the history
This commit enables StratoVirt hypervisor to be tested in kata GHA,
incluing k8s, metrics, cri-containerd, nydus and so on.

Meanwhile, adding some unit tests for StratoVirt to make sure it works.

Fixes: kata-containers#7794

Signed-off-by: Liu Wenyuan <[email protected]>
  • Loading branch information
WenyuanLau committed Nov 16, 2023
1 parent 14d8790 commit c77e990
Show file tree
Hide file tree
Showing 7 changed files with 626 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/basic-ci-amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
containerd_version: ['lts', 'active']
vmm: ['clh', 'qemu']
vmm: ['clh', 'qemu', 'stratovirt']
runs-on: garm-ubuntu-2204-smaller
env:
CONTAINERD_VERSION: ${{ matrix.containerd_version }}
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
fail-fast: false
matrix:
containerd_version: ['lts', 'active']
vmm: ['clh', 'qemu']
vmm: ['clh', 'qemu', 'stratovirt']
runs-on: garm-ubuntu-2204-smaller
env:
CONTAINERD_VERSION: ${{ matrix.containerd_version }}
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
fail-fast: false
matrix:
containerd_version: ['lts', 'active']
vmm: ['clh', 'qemu', 'dragonball']
vmm: ['clh', 'qemu', 'dragonball', 'stratovirt']
runs-on: garm-ubuntu-2204-smaller
env:
CONTAINERD_VERSION: ${{ matrix.containerd_version }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-k8s-tests-on-aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- clh
- dragonball
- qemu
- stratovirt
instance-type:
- small
- normal
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
# all the tests due to a single flaky instance.
fail-fast: false
matrix:
vmm: ['clh', 'qemu']
vmm: ['clh', 'qemu', 'stratovirt']
max-parallel: 1
runs-on: metrics
env:
Expand Down
4 changes: 4 additions & 0 deletions src/runtime/cmd/kata-runtime/kata-check_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ func setCPUtype(hypervisorType vc.HypervisorType) error {
}

switch hypervisorType {
case vc.StratovirtHypervisor:
fallthrough
case vc.FirecrackerHypervisor:
fallthrough
case vc.ClhHypervisor:
Expand Down Expand Up @@ -315,6 +317,8 @@ func archHostCanCreateVMContainer(hypervisorType vc.HypervisorType) error {
fallthrough
case vc.ClhHypervisor:
fallthrough
case vc.StratovirtHypervisor:
fallthrough
case vc.FirecrackerHypervisor:
return kvmIsUsable()
case vc.AcrnHypervisor:
Expand Down
Loading

0 comments on commit c77e990

Please sign in to comment.