MCPcopy
hub / github.com/containerd/containerd / checkUserNS

Function checkUserNS

integration/client/container_linux_test.go:1164–1173  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1162}
1163
1164func checkUserNS(t *testing.T) {
1165 cmd := exec.Command("true")
1166 cmd.SysProcAttr = &syscall.SysProcAttr{
1167 Cloneflags: syscall.CLONE_NEWUSER,
1168 }
1169
1170 if err := cmd.Run(); err != nil {
1171 t.Skip("User namespaces are unavailable")
1172 }
1173}
1174
1175func testUserNamespaces(t *testing.T, uidmaps, gidmaps []specs.LinuxIDMapping, cmdOpt oci.SpecOpts, readonlyRootFS bool, expected uint32) {
1176 checkUserNS(t)

Callers 1

testUserNamespacesFunction · 0.85

Calls 1

RunMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…