mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-05 11:12:22 +00:00
The previous version just created a network name space which does not allow us to also test additional namespaces, e.g. for unix domain sockets. This commit uses runc to create a fully namespaced container to run a test in. It creates a container, configures the network interfaces in the new network namespace before starting the container. A OCI config.json template is used and then customised for a given test based on command line arguments. Finally, instead of iperf, we use the socket stress test from https://github.com/linuxkit/virtsock as it provides finer-grained control over the traffic patterns (e.g. long lived vs lots of short lived connections). Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
22 lines
678 B
YAML
22 lines
678 B
YAML
# Sample YAML file for manual testing
|
|
kernel:
|
|
image: linuxkit/kernel:4.9.38
|
|
cmdline: "console=ttyS0"
|
|
init:
|
|
- linuxkit/init:d049e7b2074da5cd699a27defb47eb101142455d
|
|
- linuxkit/runc:d5cbeb95bdafedb82ad2cf11cff1a5da7fcae630
|
|
onboot:
|
|
- name: test-ns
|
|
image: linuxkit/test-ns:<hash>
|
|
command: ["/bin/sh", "/runp-runc-net.sh", "mix-unix"]
|
|
# command: ["/bin/sh", "/runc-net.sh", "-l", "5", "-i", "2", "-c", "5", "-p", "unix", "-ip", "6"]
|
|
mounts: # for runc
|
|
- type: cgroup
|
|
options: ["rw"]
|
|
- name: poweroff
|
|
image: linuxkit/poweroff:bce51402e293da0b653923a43c3c7be6e0effa05
|
|
command: ["/bin/sh", "/poweroff.sh", "3"]
|
|
trust:
|
|
org:
|
|
- linuxkit
|