MCPcopy
hub / github.com/containerd/containerd / testIDMapMount

Function testIDMapMount

core/mount/mount_idmapped_linux_test.go:142–156  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

140}
141
142func testIDMapMount(t *testing.T) {
143 usernsFD, err := getUsernsFD(testUIDMaps, testGIDMaps)
144 require.NoError(t, err)
145 defer usernsFD.Close()
146
147 srcDir, checkFunc := initIDMappedChecker(t, testUIDMaps, testGIDMaps, true)
148 destDir := t.TempDir()
149 defer func() {
150 require.NoError(t, UnmountAll(destDir, 0))
151 }()
152
153 err = IDMapMount(srcDir, destDir, int(usernsFD.Fd()))
154 require.NoError(t, err)
155 checkFunc(destDir)
156}
157
158func testIDMapMountWithAttrs(t *testing.T) {
159 usernsFD, err := getUsernsFD(testUIDMaps, testGIDMaps)

Callers

nothing calls this directly

Calls 5

getUsernsFDFunction · 0.85
initIDMappedCheckerFunction · 0.85
IDMapMountFunction · 0.85
UnmountAllFunction · 0.70
CloseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…