From 3e6c32c3c8605231a5be83051b7c8812576f8c74 Mon Sep 17 00:00:00 2001 From: Gabriela Cervantes Date: Thu, 4 Jul 2024 16:21:24 +0000 Subject: [PATCH] tests: Use variable already defined in stability tests This PR uses the CTR_EXE which is already defined in the metrics common script to have uniformity across the multiple stability tests. Signed-off-by: Gabriela Cervantes --- tests/stability/stressng.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/stability/stressng.sh b/tests/stability/stressng.sh index 1c2b03d7b7..dc1590fb29 100755 --- a/tests/stability/stressng.sh +++ b/tests/stability/stressng.sh @@ -18,27 +18,27 @@ function main() { init_env check_cmds "${cmds[@]}" - sudo -E ctr run -d --runtime "${CTR_RUNTIME}" "${IMAGE}" "${CONTAINER_NAME}" sh -c "${PAYLOAD_ARGS}" + sudo -E "${CTR_EXE}" run -d --runtime "${CTR_RUNTIME}" "${IMAGE}" "${CONTAINER_NAME}" sh -c "${PAYLOAD_ARGS}" # Run 1 iomix stressor (mix of I/O operations) for 20 seconds with verbose output info "Running iomix stressor test" IOMIX_CMD="stress-ng --iomix 1 -t 20 -v" - sudo -E ctr t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${IOMIX_CMD}" + sudo -E "${CTR_EXE}" t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${IOMIX_CMD}" # Run cpu stressors and virtual memory stressors for 5 minutes info "Running memory stressors for 5 minutes" MEMORY_CMD="stress-ng --cpu 2 --vm 4 -t 5m" - sudo -E ctr t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${MEMORY_CMD}" + sudo -E "${CTR_EXE}" t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${MEMORY_CMD}" # Test floating point on CPU for 60 seconds info "Running floating tests on CPU" FLOAT_CMD="stress-ng --matrix 1 -t 1m" - sudo -E ctr t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${FLOAT_CMD}" + sudo -E "${CTR_EXE}" t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${FLOAT_CMD}" # Runs two instances of the CPU stressors, one instance of the matrix info "Running instances of the CPU stressors" INSTANCE_CMD='stress-ng --cpu 2 --matrix 1 --mq 3 -t 3m' - sudo -E ctr t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${INSTANCE_CMD}" + sudo -E "${CTR_EXE}" t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${INSTANCE_CMD}" clean_env_ctr }