stability: Update stressng to run on the gha

This PR updates the stressng test to run on the gha for kata CI.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
Gabriela Cervantes 2023-11-13 17:40:13 +00:00
parent 4b7854b668
commit 9cc6908b09
2 changed files with 2 additions and 29 deletions

View File

@ -26,23 +26,7 @@ function install_dependencies() {
sudo apt-get -y install "${system_deps[@]}"
ensure_yq
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get -y install ca-certificates
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add the repository to Apt sources:
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
install_docker
}
function run() {

View File

@ -5,7 +5,6 @@
# SPDX-License-Identifier: Apache-2.0
set -o pipefail
set -x
# General env
SCRIPT_PATH=$(dirname "$(readlink -f "$0")")
@ -34,16 +33,6 @@ function main() {
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}"
# Run shared memory stressors
info "Running 8 shared memory stressors"
SHARED_CMD="stress-ng --shm 0"
sudo -E ctr t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${SHARED_CMD}"
# Run all stressors one by one on all CPUs
info "Running all stressors one by one"
STRESSORS_CMD="stress-ng --seq 0 -t 10 --tz -v"
sudo -E ctr t exec --exec-id "$(random_name)" "${CONTAINER_NAME}" sh -c "${STRESSORS_CMD}"
# Test floating point on CPU for 60 seconds
info "Running floating tests on CPU"
FLOAT_CMD="stress-ng --matrix 1 -t 1m"
@ -51,7 +40,7 @@ function main() {
# 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 5m'
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}"
clean_env_ctr