mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-25 05:42:45 +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>
38 lines
930 B
JSON
38 lines
930 B
JSON
{
|
|
"ociVersion": "1.0.0-rc5-dev",
|
|
"platform": {
|
|
"os": "linux",
|
|
"arch": "amd64"
|
|
},
|
|
"process": {
|
|
"consoleSize": {"height": 0, "width": 0},
|
|
"user": { },
|
|
"args": [ ],
|
|
"cwd": "/",
|
|
"capabilities": {
|
|
"bounding": [ ],
|
|
"effective": [ ],
|
|
"inheritable": [ ],
|
|
"permitted": [ ]
|
|
}
|
|
},
|
|
"root": { "path": "/rootfs" },
|
|
"mounts": [
|
|
{ "destination": "/proc", "type": "proc", "source": "proc" },
|
|
{ "destination": "/dev", "type": "tmpfs", "source": "tmpfs" },
|
|
{ "destination": "/sys", "type": "sysfs", "source": "sysfs" }
|
|
],
|
|
"linux": {
|
|
"resources": {},
|
|
"namespaces": [
|
|
{ "type": "pid" },
|
|
{ "type": "network" },
|
|
{ "type": "mount" },
|
|
{ "type": "ipc" }
|
|
]
|
|
},
|
|
"hooks": {
|
|
"prestart": [ ]
|
|
}
|
|
}
|