From 30ff58904eb05b18454b9479a5e1b881a60973c1 Mon Sep 17 00:00:00 2001 From: Gabriela Cervantes Date: Tue, 10 Oct 2023 19:58:29 +0000 Subject: [PATCH 1/3] tests: Enable scability test for stability CI This PR enables the scability test for stability CI gha. Fixes #8196 Signed-off-by: Gabriela Cervantes --- tests/stability/gha-run.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/stability/gha-run.sh b/tests/stability/gha-run.sh index 01672534a4..c792053f59 100755 --- a/tests/stability/gha-run.sh +++ b/tests/stability/gha-run.sh @@ -39,6 +39,9 @@ function run() { export ITERATIONS=2 MAX_CONTAINERS=20 bash "${stability_dir}/soak_parallel_rm.sh" + + info "Running scability test using ${KATA_HYPERVISOR} hypervisor" + bash "${stability_dir}/scability_test.sh 10 10" } function main() { From c6463cb5aea43b49a2bb2d0bf595820e69336ce2 Mon Sep 17 00:00:00 2001 From: Gabriela Cervantes Date: Tue, 10 Oct 2023 21:18:29 +0000 Subject: [PATCH 2/3] tests: Fix path for versions yaml for soak parallel test This PR fixes the path for versions yaml for soak parallel test. Signed-off-by: Gabriela Cervantes --- tests/stability/gha-run.sh | 2 +- tests/stability/soak_parallel_rm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/stability/gha-run.sh b/tests/stability/gha-run.sh index c792053f59..a6e9bce5aa 100755 --- a/tests/stability/gha-run.sh +++ b/tests/stability/gha-run.sh @@ -41,7 +41,7 @@ function run() { bash "${stability_dir}/soak_parallel_rm.sh" info "Running scability test using ${KATA_HYPERVISOR} hypervisor" - bash "${stability_dir}/scability_test.sh 10 10" + bash "${stability_dir}/scability_test.sh" 10 10 } function main() { diff --git a/tests/stability/soak_parallel_rm.sh b/tests/stability/soak_parallel_rm.sh index c05c2fade0..9404496d55 100755 --- a/tests/stability/soak_parallel_rm.sh +++ b/tests/stability/soak_parallel_rm.sh @@ -172,7 +172,7 @@ function init() { check_kata_components=0 fi - versions_file="${cidir}/../versions.yaml" + versions_file="${cidir}/../../versions.yaml" nginx_version=$("${GOPATH}/bin/yq" read "$versions_file" "docker_images.nginx.version") nginx_image="docker.io/library/nginx:$nginx_version" From ef6388e8158139e1db0a616c319d1278568c1af1 Mon Sep 17 00:00:00 2001 From: Gabriela Cervantes Date: Tue, 10 Oct 2023 23:15:26 +0000 Subject: [PATCH 3/3] tests: Remove unused function from scability test This PR removes an unused function from scability test. Signed-off-by: Gabriela Cervantes --- tests/stability/gha-run.sh | 2 +- tests/stability/scability_test.sh | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/tests/stability/gha-run.sh b/tests/stability/gha-run.sh index a6e9bce5aa..47dfb2b322 100755 --- a/tests/stability/gha-run.sh +++ b/tests/stability/gha-run.sh @@ -41,7 +41,7 @@ function run() { bash "${stability_dir}/soak_parallel_rm.sh" info "Running scability test using ${KATA_HYPERVISOR} hypervisor" - bash "${stability_dir}/scability_test.sh" 10 10 + bash "${stability_dir}/scability_test.sh" 15 60 } function main() { diff --git a/tests/stability/scability_test.sh b/tests/stability/scability_test.sh index 86d941e659..c3c381a59b 100755 --- a/tests/stability/scability_test.sh +++ b/tests/stability/scability_test.sh @@ -39,8 +39,7 @@ function main() { local containers=() local not_started_count="${NUM_CONTAINERS}" - init_env - check_cmds "${cmds[@]}" + clean_env_ctr sudo -E ctr i pull "${IMAGE}" info "Creating ${NUM_CONTAINERS} containers" @@ -53,16 +52,10 @@ function main() { done # Check that the requested number of containers are running - check_containers_are_up & pid=$! - (sleep "${TIMEOUT_LAUNCH}" && kill -HUP "${pid}") 2>/dev/null & pid_tout=$! + check_containers_are_up "${NUM_CONTAINERS}" - if wait "${pid}" 2>/dev/null; then - pkill -HUP -P "${pid_tout}" - wait "${pid_tout}" - else - warn "Time out exceeded" - return 1 - fi + # Check that the requested number of containers are running + check_containers_are_running "${NUM_CONTAINERS}" clean_env_ctr }