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

Function TestVerifyGroupPath

cgroup2/paths_test.go:25–44  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestVerifyGroupPath(t *testing.T) {
26 valids := map[string]bool{
27 "/": true,
28 "": false,
29 "/foo": true,
30 "/foo/bar": true,
31 "/sys/fs/cgroup/foo": false,
32 "/sys/fs/cgroup/unified/foo": false,
33 "foo": false,
34 "/foo/../bar": false,
35 }
36 for s, valid := range valids {
37 err := VerifyGroupPath(s)
38 if valid {
39 assert.NoError(t, err)
40 } else {
41 assert.Error(t, err)
42 }
43 }
44}

Callers

nothing calls this directly

Calls 1

VerifyGroupPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…