Merge pull request #9678 from AdithyaKrishnan/main

TEEs: Skip a few CI tests for SEV/SNP
This commit is contained in:
Fabiano Fidêncio
2024-06-04 23:42:51 +02:00
committed by GitHub
9 changed files with 17 additions and 12 deletions

View File

@@ -247,8 +247,8 @@ DEFSHAREDFS_QEMU_VIRTIOFS := virtio-fs
DEFSHAREDFS_QEMU_COCO_DEV_VIRTIOFS := virtio-9p DEFSHAREDFS_QEMU_COCO_DEV_VIRTIOFS := virtio-9p
DEFSHAREDFS_STRATOVIRT_VIRTIOFS := virtio-fs DEFSHAREDFS_STRATOVIRT_VIRTIOFS := virtio-fs
DEFSHAREDFS_QEMU_TDX_VIRTIOFS := none DEFSHAREDFS_QEMU_TDX_VIRTIOFS := none
DEFSHAREDFS_QEMU_SEV_VIRTIOFS := virtio-9p DEFSHAREDFS_QEMU_SEV_VIRTIOFS := none
DEFSHAREDFS_QEMU_SNP_VIRTIOFS := virtio-9p DEFSHAREDFS_QEMU_SNP_VIRTIOFS := none
DEFVIRTIOFSDAEMON := $(LIBEXECDIR)/virtiofsd DEFVIRTIOFSDAEMON := $(LIBEXECDIR)/virtiofsd
DEFVALIDVIRTIOFSDAEMONPATHS := [\"$(DEFVIRTIOFSDAEMON)\"] DEFVALIDVIRTIOFSDAEMONPATHS := [\"$(DEFVIRTIOFSDAEMON)\"]
# Default DAX mapping cache size in MiB # Default DAX mapping cache size in MiB

View File

@@ -444,7 +444,7 @@ function cleanup() {
fi fi
# Switch back to the default namespace and delete the tests one # Switch back to the default namespace and delete the tests one
delete_test_cluster_namespace delete_test_cluster_namespace || true
cleanup_kata_deploy cleanup_kata_deploy
} }

View File

@@ -9,7 +9,8 @@ load "${BATS_TEST_DIRNAME}/../../common.bash"
load "${BATS_TEST_DIRNAME}/tests_common.sh" load "${BATS_TEST_DIRNAME}/tests_common.sh"
setup() { setup() {
[[ "${KATA_HYPERVISOR}" = "qemu-tdx" || "${KATA_HYPERVISOR}" = "qemu-coco-dev" ]] && \ [[ "${KATA_HYPERVISOR}" = "qemu-tdx" || "${KATA_HYPERVISOR}" = "qemu-coco-dev" || \
"${KATA_HYPERVISOR}" = "qemu-sev" || "${KATA_HYPERVISOR}" = "qemu-snp" ]] && \
skip "See: https://github.com/kata-containers/kata-containers/issues/9664" skip "See: https://github.com/kata-containers/kata-containers/issues/9664"
pod_name="busybox" pod_name="busybox"
@@ -42,7 +43,8 @@ setup() {
} }
teardown() { teardown() {
[[ "${KATA_HYPERVISOR}" = "qemu-tdx" || "${KATA_HYPERVISOR}" = "qemu-coco-dev" ]] && \ [[ "${KATA_HYPERVISOR}" = "qemu-tdx" || "${KATA_HYPERVISOR}" = "qemu-coco-dev" || \
"${KATA_HYPERVISOR}" = "qemu-sev" || "${KATA_HYPERVISOR}" = "qemu-snp" ]] && \
skip "See: https://github.com/kata-containers/kata-containers/issues/9664" skip "See: https://github.com/kata-containers/kata-containers/issues/9664"
# Debugging information # Debugging information

View File

@@ -42,7 +42,8 @@ setup() {
} }
@test "initContainer with shared volume" { @test "initContainer with shared volume" {
[[ "${KATA_HYPERVISOR}" = "qemu-tdx" || "${KATA_HYPERVISOR}" = "qemu-coco-dev" ]] && \ [[ "${KATA_HYPERVISOR}" = "qemu-tdx" || "${KATA_HYPERVISOR}" = "qemu-coco-dev" || \
"${KATA_HYPERVISOR}" = "qemu-sev" || "${KATA_HYPERVISOR}" = "qemu-snp" ]] && \
skip "See: https://github.com/kata-containers/kata-containers/issues/9668" skip "See: https://github.com/kata-containers/kata-containers/issues/9668"
pod_name="initcontainer-shared-volume" pod_name="initcontainer-shared-volume"

View File

@@ -9,7 +9,8 @@ load "${BATS_TEST_DIRNAME}/../../common.bash"
load "${BATS_TEST_DIRNAME}/tests_common.sh" load "${BATS_TEST_DIRNAME}/tests_common.sh"
setup() { setup() {
[[ "${KATA_HYPERVISOR}" = "qemu-tdx" || "${KATA_HYPERVISOR}" = "qemu-coco-dev" ]] && \ [[ "${KATA_HYPERVISOR}" = "qemu-tdx" || "${KATA_HYPERVISOR}" = "qemu-coco-dev" || \
"${KATA_HYPERVISOR}" = "qemu-sev" || "${KATA_HYPERVISOR}" = "qemu-snp" ]] && \
skip "See: https://github.com/kata-containers/kata-containers/issues/9666" skip "See: https://github.com/kata-containers/kata-containers/issues/9666"
pod_name="sysctl-test" pod_name="sysctl-test"
@@ -33,7 +34,8 @@ setup() {
} }
teardown() { teardown() {
[[ "${KATA_HYPERVISOR}" = "qemu-tdx" || "${KATA_HYPERVISOR}" = "qemu-coco-dev" ]] && \ [[ "${KATA_HYPERVISOR}" = "qemu-tdx" || "${KATA_HYPERVISOR}" = "qemu-coco-dev" || \
"${KATA_HYPERVISOR}" = "qemu-sev" || "${KATA_HYPERVISOR}" = "qemu-snp" ]] && \
skip "See: https://github.com/kata-containers/kata-containers/issues/9666" skip "See: https://github.com/kata-containers/kata-containers/issues/9666"
# Debugging information # Debugging information

View File

@@ -19,7 +19,7 @@ spec:
type: File type: File
containers: containers:
- name: busybox-file-volume-container - name: busybox-file-volume-container
image: busybox image: quay.io/prometheus/busybox:latest
volumeMounts: volumeMounts:
- name: shared-file - name: shared-file
mountPath: MOUNT_PATH mountPath: MOUNT_PATH

View File

@@ -18,7 +18,7 @@ spec:
type: Directory type: Directory
containers: containers:
- name: busybox-ro-volume-container - name: busybox-ro-volume-container
image: busybox image: quay.io/prometheus/busybox:latest
volumeMounts: volumeMounts:
- name: shared-data - name: shared-data
mountPath: /tmp mountPath: /tmp

2
tests/integration/kubernetes/setup.sh Executable file → Normal file
View File

@@ -115,7 +115,7 @@ add_runtime_handler_annotations() {
fi fi
case "${KATA_HYPERVISOR}" in case "${KATA_HYPERVISOR}" in
qemu-tdx|qemu-coco-dev) qemu-coco-dev | qemu-sev | qemu-snp | qemu-tdx)
info "Add runtime handler annotations for ${KATA_HYPERVISOR}" info "Add runtime handler annotations for ${KATA_HYPERVISOR}"
local handler_value="kata-${KATA_HYPERVISOR}" local handler_value="kata-${KATA_HYPERVISOR}"
for K8S_TEST_YAML in runtimeclass_workloads_work/*.yaml for K8S_TEST_YAML in runtimeclass_workloads_work/*.yaml

View File

@@ -111,7 +111,7 @@ exec_host() {
# [bats-exec-test:38] INFO: k8s configured to use runtimeclass # [bats-exec-test:38] INFO: k8s configured to use runtimeclass
# bash: line 1: $'\r': command not found # bash: line 1: $'\r': command not found
# ``` # ```
output="$(kubectl debug -qit "node/${node}" --image=alpine:latest -- chroot /host bash -c "${command}" | tr -d '\r')" output="$(kubectl debug -qit "node/${node}" --image=ghcr.io/linuxcontainers/alpine:latest -- chroot /host bash -c "${command}" | tr -d '\r')"
# Get the updated list of debugger pods. # Get the updated list of debugger pods.
declare -a new_debugger_pods=( $(kubectl get pods -o name | grep node-debugger) ) declare -a new_debugger_pods=( $(kubectl get pods -o name | grep node-debugger) )