mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct/cg: simplify getting cgroup manager
1. Make Rootless and Systemd flags part of config.Cgroups. 2. Make all cgroup managers (not just fs2) return error (so it can do more initialization -- added by the following commits). 3. Replace complicated cgroup manager instantiation in factory_linux by a single (and simple) libcontainer/cgroups/manager.New() function. 4. getUnifiedPath is simplified to check that only a single path is supplied (rather than checking that other paths, if supplied, are the same). [v2: can't -> cannot] Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -62,7 +62,7 @@ func testCheckpoint(t *testing.T, userns bool) {
|
||||
}
|
||||
|
||||
config := newTemplateConfig(t, &tParam{userns: userns})
|
||||
factory, err := libcontainer.New(t.TempDir(), libcontainer.Cgroupfs)
|
||||
factory, err := libcontainer.New(t.TempDir())
|
||||
ok(t, err)
|
||||
|
||||
container, err := factory.Create("test", config)
|
||||
|
||||
Reference in New Issue
Block a user