From a5a73a11cb1da63d5e5225dd4333cb08f7d86e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 29 Nov 2023 10:04:11 +0100 Subject: [PATCH] tests: Replace `kata-runtime kata-env` by `kata-runtime env` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `kata-runtime env` is an alias for `kata-runtime kata-env, and calling it with the `env` paramenter allows us to easily extend the scripts to use `kata-ctl` instead of `kata-runtime` when dealing with runtime-rs. Signed-off-by: Fabiano FidĂȘncio --- tests/common.bash | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/common.bash b/tests/common.bash index 9e9025bbf4..d858748bb8 100644 --- a/tests/common.bash +++ b/tests/common.bash @@ -80,23 +80,23 @@ function is_a_kata_runtime() { # Gets versions and paths of all the components # list in kata-env function extract_kata_env() { - RUNTIME_CONFIG_PATH=$(kata-runtime kata-env --json | jq -r .Runtime.Config.Path) - RUNTIME_VERSION=$(kata-runtime kata-env --json | jq -r .Runtime.Version | grep Semver | cut -d'"' -f4) - RUNTIME_COMMIT=$(kata-runtime kata-env --json | jq -r .Runtime.Version | grep Commit | cut -d'"' -f4) - RUNTIME_PATH=$(kata-runtime kata-env --json | jq -r .Runtime.Path) + RUNTIME_CONFIG_PATH=$(kata-runtime env --json | jq -r .Runtime.Config.Path) + RUNTIME_VERSION=$(kata-runtime env --json | jq -r .Runtime.Version | grep Semver | cut -d'"' -f4) + RUNTIME_COMMIT=$(kata-runtime env --json | jq -r .Runtime.Version | grep Commit | cut -d'"' -f4) + RUNTIME_PATH=$(kata-runtime env --json | jq -r .Runtime.Path) # Shimv2 path is being affected by https://github.com/kata-containers/kata-containers/issues/1151 SHIM_PATH=$(readlink $(command -v containerd-shim-kata-v2)) SHIM_VERSION=${RUNTIME_VERSION} - HYPERVISOR_PATH=$(kata-runtime kata-env --json | jq -r .Hypervisor.Path) + HYPERVISOR_PATH=$(kata-runtime env --json | jq -r .Hypervisor.Path) # TODO: there is no kata-runtime of rust version currently if [ "${KATA_HYPERVISOR}" != "dragonball" ]; then HYPERVISOR_VERSION=$(sudo -E ${HYPERVISOR_PATH} --version | head -n1) fi - VIRTIOFSD_PATH=$(kata-runtime kata-env --json | jq -r .Hypervisor.VirtioFSDaemon) + VIRTIOFSD_PATH=$(kata-runtime env --json | jq -r .Hypervisor.VirtioFSDaemon) - INITRD_PATH=$(kata-runtime kata-env --json | jq -r .Initrd.Path) + INITRD_PATH=$(kata-runtime env --json | jq -r .Initrd.Path) } # Checks that processes are not running @@ -105,8 +105,8 @@ function check_processes() { # Only check the kata-env if we have managed to find the kata executable... if [ -x "$RUNTIME_PATH" ]; then - local vsock_configured=$($RUNTIME_PATH kata-env | awk '/UseVSock/ {print $3}') - local vsock_supported=$($RUNTIME_PATH kata-env | awk '/SupportVSock/ {print $3}') + local vsock_configured=$($RUNTIME_PATH env | awk '/UseVSock/ {print $3}') + local vsock_supported=$($RUNTIME_PATH env | awk '/SupportVSock/ {print $3}') else local vsock_configured="false" local vsock_supported="false"