(t *testing.T)
| 25 | ) |
| 26 | |
| 27 | func 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…