mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-18 16:08:25 +00:00
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 <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
parent
ddb8a94677
commit
3e6c32c3c8
@ -18,27 +18,27 @@ function main() {
|
|||||||
|
|
||||||
init_env
|
init_env
|
||||||
check_cmds "${cmds[@]}"
|
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
|
# Run 1 iomix stressor (mix of I/O operations) for 20 seconds with verbose output
|
||||||
info "Running iomix stressor test"
|
info "Running iomix stressor test"
|
||||||
IOMIX_CMD="stress-ng --iomix 1 -t 20 -v"
|
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
|
# Run cpu stressors and virtual memory stressors for 5 minutes
|
||||||
info "Running memory stressors for 5 minutes"
|
info "Running memory stressors for 5 minutes"
|
||||||
MEMORY_CMD="stress-ng --cpu 2 --vm 4 -t 5m"
|
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
|
# Test floating point on CPU for 60 seconds
|
||||||
info "Running floating tests on CPU"
|
info "Running floating tests on CPU"
|
||||||
FLOAT_CMD="stress-ng --matrix 1 -t 1m"
|
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
|
# Runs two instances of the CPU stressors, one instance of the matrix
|
||||||
info "Running instances of the CPU stressors"
|
info "Running instances of the CPU stressors"
|
||||||
INSTANCE_CMD='stress-ng --cpu 2 --matrix 1 --mq 3 -t 3m'
|
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
|
clean_env_ctr
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user