MCPcopy Create free account
hub / github.com/containerd/cgroups / checkCgroupMode

Function checkCgroupMode

cgroup2/testutils_test.go:32–41  ·  view source on GitHub ↗
(tb testing.TB)

Source from the content-addressed store, hash-verified

30)
31
32func checkCgroupMode(tb testing.TB) {
33 var st unix.Statfs_t
34 err := unix.Statfs(defaultCgroup2Path, &st)
35 require.NoError(tb, err, "cannot statfs cgroup root")
36
37 isUnified := st.Type == unix.CGROUP2_SUPER_MAGIC
38 if !isUnified {
39 tb.Skip("System running in hybrid or cgroupv1 mode")
40 }
41}
42
43func requireSystemdVersion(tb testing.TB, requiredMinVersion int) {
44 conn, err := systemdDbus.NewWithContext(context.TODO())

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…