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

Function TestCgroupv2IOController

cgroup2/iov2_test.go:27–50  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25)
26
27func TestCgroupv2IOController(t *testing.T) {
28 t.Skip("FIXME: this test doesn't work on Fedora 32 Vagrant: TestCgroupv2IOController: iov2_test.go:42: failed to init new cgroup manager: write /sys/fs/cgroup/io-test-cg-22708/io.max: no such device")
29 checkCgroupMode(t)
30 group := "/io-test-cg"
31 groupPath := fmt.Sprintf("%s-%d", group, os.Getpid())
32 var (
33 // weight uint16 = 100
34 maj int64 = 8
35 min int64 = 0
36 rate uint64 = 120
37 )
38 res := Resources{
39 IO: &IO{
40 Max: []Entry{{Major: maj, Minor: min, Type: ReadIOPS, Rate: rate}},
41 },
42 }
43 c, err := NewManager(defaultCgroup2Path, groupPath, &res)
44 require.NoError(t, err, "failed to init new cgroup manager")
45 t.Cleanup(func() {
46 os.Remove(c.path)
47 })
48
49 checkFileContent(t, c.path, "io.max", "8:0 rbps=max wbps=max riops=120 wiops=max")
50}

Callers

nothing calls this directly

Calls 3

checkCgroupModeFunction · 0.85
NewManagerFunction · 0.85
checkFileContentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…