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

tests: k8s: Enable tests for cloud hypervisor runtime-rs without devicemapper #8628

Merged
merged 2 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions tests/integration/kubernetes/gha-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,9 @@ function run_tests() {

pushd "${kubernetes_dir}"
bash setup.sh
if [[ "${KATA_HYPERVISOR}" = "dragonball" ]] && [[ "${SNAPSHOTTER}" = "devmapper" ]]; then
echo "Skipping tests for dragonball using devmapper"
elif [[ "${KATA_HYPERVISOR}" = "cloud-hypervisor" ]]; then
echo "Skipping tests for ${KATA_HYPERVISOR}"
if [[ "${KATA_HYPERVISOR}" = "dragonball" ]] && [[ "${SNAPSHOTTER}" = "devmapper" ]] || [[ "${KATA_HYPERVISOR}" = "cloud-hypervisor" ]] && [[ "${SNAPSHOTTER}" = "devmapper" ]]; then
# cloud-hypervisor runtime-rs issue is https://github.com/kata-containers/kata-containers/issues/9034
echo "Skipping tests for $KATA_HYPERVISOR using devmapper"
else
bash run_kubernetes_tests.sh
fi
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/kubernetes/k8s-cpu-ns.bats
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ setup() {
[ "${KATA_HYPERVISOR}" == "firecracker" ] && skip "test not working see: ${fc_limitations}"
[ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: ${fc_limitations}"
[ "${KATA_HYPERVISOR}" == "dragonball" ] && skip "test not working see: ${dragonball_limitations}"
[ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && skip "https://github.com/kata-containers/kata-containers/issues/9039"
( [ "${KATA_HYPERVISOR}" == "qemu-tdx" ] || [ "${KATA_HYPERVISOR}" == "qemu-snp" ] || \
[ "${KATA_HYPERVISOR}" == "qemu-sev" ] || [ "${KATA_HYPERVISOR}" == "qemu-se" ] ) \
&& skip "TEEs do not support memory / CPU hotplug"
Expand Down Expand Up @@ -74,6 +75,7 @@ teardown() {
[ "${KATA_HYPERVISOR}" == "firecracker" ] && skip "test not working see: ${fc_limitations}"
[ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: ${fc_limitations}"
[ "${KATA_HYPERVISOR}" == "dragonball" ] && skip "test not working see: ${dragonball_limitations}"
[ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && skip "https://github.com/kata-containers/kata-containers/issues/9039"
( [ "${KATA_HYPERVISOR}" == "qemu-tdx" ] || [ "${KATA_HYPERVISOR}" == "qemu-snp" ] || \
[ "${KATA_HYPERVISOR}" == "qemu-sev" ] || [ "${KATA_HYPERVISOR}" == "qemu-se" ] ) \
&& skip "TEEs do not support memory / CPU hotplug"
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/kubernetes/k8s-number-cpus.bats
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ load "${BATS_TEST_DIRNAME}/../../common.bash"
load "${BATS_TEST_DIRNAME}/tests_common.sh"

setup() {
[[ "${KATA_HYPERVISOR}" = "cloud-hypervisor" ]]&& skip "test not working https://github.com/kata-containers/kata-containers/issues/9039"
pod_name="cpu-test"
container_name="c1"
get_pod_config_dir
Expand Down Expand Up @@ -40,6 +41,7 @@ setup() {
}

teardown() {
[[ "${KATA_HYPERVISOR}" = "cloud-hypervisor" ]]&& skip "test not working https://github.com/kata-containers/kata-containers/issues/9039"
# Debugging information
kubectl describe "pod/$pod_name"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ load "${BATS_TEST_DIRNAME}/../../common.bash"
load "${BATS_TEST_DIRNAME}/tests_common.sh"

setup() {
[ "${KATA_HYPERVISOR}" == "dragonball" ] && \
skip "runtime-rs is still using the old vcpus allocation algorithm, skipping the test"
[ "${KATA_HYPERVISOR}" == "dragonball" ] || [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ]&& \
skip "runtime-rs is still using the old vcpus allocation algorithm, skipping the test see https://github.com/kata-containers/kata-containers/issues/8660"

get_pod_config_dir
pods=( "vcpus-less-than-one-with-no-limits" "vcpus-less-than-one-with-limits" "vcpus-more-than-one-with-limits" )
Expand All @@ -29,8 +29,8 @@ setup() {
}

teardown() {
[ "${KATA_HYPERVISOR}" == "dragonball" ] && \
skip "runtime-rs is still using the old vcpus allocation algorithm, skipping the test"
[ "${KATA_HYPERVISOR}" == "dragonball" ] || [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && \
skip "runtime-rs is still using the old vcpus allocation algorithm, skipping the test see https://github.com/kata-containers/kata-containers/issues/8660"

for pod in "${pods[@]}"; do
kubectl logs ${pod}
Expand Down