From 757f37d956ef256247552fbdeea1a1528bae3a66 Mon Sep 17 00:00:00 2001 From: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com> Date: Thu, 4 Jul 2024 16:32:46 +0000 Subject: [PATCH] stability: General improvements for soak parallel test This PR has better variable definitons as well the use of a variable which is already defined in the metrics common script for soak parallel test. Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com> --- tests/stability/scability_test.sh | 4 ++-- tests/stability/soak_parallel_rm.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/stability/scability_test.sh b/tests/stability/scability_test.sh index c3c381a59b..69408f5347 100755 --- a/tests/stability/scability_test.sh +++ b/tests/stability/scability_test.sh @@ -40,13 +40,13 @@ function main() { local not_started_count="${NUM_CONTAINERS}" clean_env_ctr - sudo -E ctr i pull "${IMAGE}" + sudo -E "${CTR_EXE}" i pull "${IMAGE}" info "Creating ${NUM_CONTAINERS} containers" for ((i=1; i<= "${NUM_CONTAINERS}"; i++)); do containers+=($(random_name)) - sudo -E ctr run -d --runtime "${CTR_RUNTIME}" "${IMAGE}" "${containers[-1]}" sh -c "${PAYLOAD_ARGS}" + sudo -E "${CTR_EXE}" run -d --runtime "${CTR_RUNTIME}" "${IMAGE}" "${containers[-1]}" sh -c "${PAYLOAD_ARGS}" ((not_started_count--)) info "$not_started_count remaining containers" done diff --git a/tests/stability/soak_parallel_rm.sh b/tests/stability/soak_parallel_rm.sh index 7605e8b251..2423cc975b 100755 --- a/tests/stability/soak_parallel_rm.sh +++ b/tests/stability/soak_parallel_rm.sh @@ -53,7 +53,7 @@ function check_vsock_active() { } function count_containers() { - sudo ctr c list -q | wc -l + sudo "${CTR_EXE}" c list -q | wc -l } function check_all_running() { @@ -124,7 +124,7 @@ function go() { local i for ((i=1; i<= ${MAX_CONTAINERS}; i++)); do containers+=($(random_name)) - sudo ctr run --runtime=${CTR_RUNTIME} -d ${nginx_image} ${containers[-1]} sh -c ${COMMAND} + sudo "${CTR_EXE}" run --runtime="${CTR_RUNTIME}" -d "${nginx_image}" "${containers[-1]}" sh -c "${COMMAND}" ((how_many++)) done @@ -177,7 +177,7 @@ function init() { nginx_image="docker.io/library/nginx:$nginx_version" # Pull nginx image - sudo ctr image pull ${nginx_image} + sudo "${CTR_EXE}" image pull "${nginx_image}" if [ $? != 0 ]; then die "Unable to retry docker image ${nginx_image}" fi