test: the README.md says the numbers correspond to the first letter

A few of these tests appear to be misnumbered, so renumber them.

Signed-off-by: David Scott <dave@recoil.org>
This commit is contained in:
David Scott
2021-10-26 19:57:24 +01:00
parent e8f8a409e8
commit 9d16e2a2b9
17 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
#!/bin/sh
function failed {
printf "containerd commandline vars not set: FAILED\n" >/dev/console
/sbin/poweroff -f
exit 1
}
ps -ef | grep containerd | grep -q trace || failed
printf "containerd commandline vars test suite PASSED\n" >/dev/console
/sbin/poweroff -f

View File

@@ -0,0 +1,3 @@
cliopts="--log-level trace"
stderr="/var/log/containerd.out.log"
stdout="stdout"

View File

@@ -0,0 +1,24 @@
#!/bin/sh
# SUMMARY: Check that the containerd command-line options have been enabled by init
# LABELS:
# REPEAT:
set -e
# Source libraries. Uncomment if needed/defined
#. "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
NAME=init_containerd
clean_up() {
rm -rf ${NAME}-*
}
trap clean_up EXIT
# Test code goes here
linuxkit build -format kernel+initrd -name "${NAME}" test.yml
RESULT="$(linuxkit run $NAME)"
echo "${RESULT}"
echo "${RESULT}" | grep -q "suite PASSED"
exit 0

View File

@@ -0,0 +1,29 @@
kernel:
image: linuxkit/kernel:5.10.47
cmdline: "console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:43c52456571369d62882605e4d510f0df3ed93de
- linuxkit/runc:5f9941eed05f58293f928c9f2f0b6a3f9f6f55c1
- linuxkit/containerd:b991571dd383351dbb2873f9ae3b70475adb6816
- linuxkit/ca-certificates:4df823737c9bf6a9564b736f1a19fd25d60e909a
services:
- name: test
image: alpine:3.13
pid: host
binds:
- /check.sh:/check.sh
- /dev/console:/dev/console
devices:
- path: "/dev/console"
type: c
major: 5
minor: 1
mode: "0666"
capabilities:
- CAP_SYS_BOOT
command: ["sh", "/check.sh"]
files:
- path: check.sh
source: ./check.sh
- path: /etc/containerd/runtime-config.toml
source: ./runtime-config.toml