diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-16 04:36:06 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-16 04:41:21 +0200 |
commit | 7027ff61a34a12487712b382a061c654acc3a679 (patch) | |
tree | 05e9374a566d6accdd962dd4dc6d7076b9304122 /src/test/test-cgroup.c | |
parent | cec4ead904978b07db2154c618eeb48d3102da66 (diff) |
nspawn: introduce the new /machine/ tree in the cgroup tree and move containers there
Containers will now carry a label (normally derived from the root
directory name, but configurable by the user), and the container's root
cgroup is /machine/<label>. This label is called "machine name", and can
cover both containers and VMs (as soon as libvirt also makes use of
/machine/).
libsystemd-login can be used to query the machine name from a process.
This patch also includes numerous clean-ups for the cgroup code.
Diffstat (limited to 'src/test/test-cgroup.c')
-rw-r--r-- | src/test/test-cgroup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test-cgroup.c b/src/test/test-cgroup.c index 2f7cc9be0a..3a3489d6a2 100644 --- a/src/test/test-cgroup.c +++ b/src/test/test-cgroup.c @@ -37,19 +37,19 @@ int main(int argc, char*argv[]) { assert_se(cg_create(SYSTEMD_CGROUP_CONTROLLER, "/test-b/test-c", NULL) == 0); assert_se(cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, "/test-b", 0) == 0); - assert_se(cg_get_by_pid(SYSTEMD_CGROUP_CONTROLLER, getpid(), &path) == 0); + assert_se(cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, getpid(), &path) == 0); assert_se(streq(path, "/test-b")); free(path); assert_se(cg_attach(SYSTEMD_CGROUP_CONTROLLER, "/test-a", 0) == 0); - assert_se(cg_get_by_pid(SYSTEMD_CGROUP_CONTROLLER, getpid(), &path) == 0); + assert_se(cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, getpid(), &path) == 0); assert_se(path_equal(path, "/test-a")); free(path); assert_se(cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, "/test-b/test-d", 0) == 0); - assert_se(cg_get_by_pid(SYSTEMD_CGROUP_CONTROLLER, getpid(), &path) == 0); + assert_se(cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, getpid(), &path) == 0); assert_se(path_equal(path, "/test-b/test-d")); free(path); |