test: configure self when kata-runtime is the CONTAINER_RUNTIME
specifically, set RUNTIME_NAME and CONTAINER_DEFAULT_RUNTIME if it's set as such
@@ -31,17 +31,21 @@ CONMON_BINARY=${CONMON_BINARY:-$(command -v conmon)}
CONTAINER_CONMON_CGROUP=${CONTAINER_CONMON_CGROUP:-pod}
# Path of the default seccomp profile.
CONTAINER_SECCOMP_PROFILE=${CONTAINER_SECCOMP_PROFILE:-${CRIO_ROOT}/vendor/github.com/seccomp/containers-golang/seccomp.json}
-# Runtime
-CONTAINER_DEFAULT_RUNTIME=${CONTAINER_DEFAULT_RUNTIME:-runc}
-RUNTIME_NAME=${RUNTIME_NAME:-runc}
-CONTAINER_RUNTIME=${CONTAINER_RUNTIME:-runc}
CONTAINER_UID_MAPPINGS=${CONTAINER_UID_MAPPINGS:-}
CONTAINER_GID_MAPPINGS=${CONTAINER_GID_MAPPINGS:-}
OVERRIDE_OPTIONS=${OVERRIDE_OPTIONS:-}
+# Runtime
+CONTAINER_RUNTIME=${CONTAINER_RUNTIME:-runc}
+CONTAINER_DEFAULT_RUNTIME=${CONTAINER_DEFAULT_RUNTIME:-runc}
+RUNTIME_NAME=${RUNTIME_NAME:-runc}
RUNTIME_PATH=$(command -v "$CONTAINER_RUNTIME" || true)
RUNTIME_BINARY=${RUNTIME_PATH:-$(command -v runc)}
RUNTIME_ROOT=${RUNTIME_ROOT:-/run/runc}
RUNTIME_TYPE=${RUNTIME_TYPE:-oci}
+if [[ $CONTAINER_RUNTIME == "kata-runtime" ]]; then
+ export RUNTIME_NAME="$CONTAINER_RUNTIME"
+ export CONTAINER_DEFAULT_RUNTIME="$RUNTIME_NAME"
+fi
# Path of the apparmor_parser binary.
APPARMOR_PARSER_BINARY=${APPARMOR_PARSER_BINARY:-/sbin/apparmor_parser}
# Path of the apparmor profile for test.
