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

Function checkTaskid

cgroup1/cgroup_test.go:350–363  ·  view source on GitHub ↗
(mock *mockCgroup, path string, expected int)

Source from the content-addressed store, hash-verified

348}
349
350func checkTaskid(mock *mockCgroup, path string, expected int) error {
351 data, err := readValue(mock, filepath.Join(path, cgroupTasks))
352 if err != nil {
353 return err
354 }
355 v, err := strconv.Atoi(data)
356 if err != nil {
357 return err
358 }
359 if v != expected {
360 return fmt.Errorf("expected task id %d but received %d", expected, v)
361 }
362 return nil
363}
364
365func mockNewNotInRdma(subsystems []Subsystem, path Path, resources *specs.LinuxResources) (Cgroup, error) {
366 for _, s := range subsystems {

Callers 4

TestAddTaskFunction · 0.85
TestListTasksPidsFunction · 0.85
TestCreateSubCgroupFunction · 0.85

Calls 1

readValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…