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

Function requireSystemdVersion

cgroup2/testutils_test.go:43–51  ·  view source on GitHub ↗
(tb testing.TB, requiredMinVersion int)

Source from the content-addressed store, hash-verified

41}
42
43func requireSystemdVersion(tb testing.TB, requiredMinVersion int) {
44 conn, err := systemdDbus.NewWithContext(context.TODO())
45 require.NoError(tb, err, "failed to connect to systemd")
46 defer conn.Close()
47
48 if sdVer := systemdVersion(conn); sdVer < requiredMinVersion {
49 tb.Skipf("Skipping test; systemd version %d < required version %d", sdVer, requiredMinVersion)
50 }
51}
52
53func checkCgroupControllerSupported(t *testing.T, controller string) {
54 b, err := os.ReadFile(filepath.Join(defaultCgroup2Path, controllersFile))

Callers 1

TestCPUQuotaPeriodUSecFunction · 0.85

Calls 1

systemdVersionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…