MCPcopy
hub / github.com/containerd/containerd / TestAutoclearFalseLoop

Function TestAutoclearFalseLoop

core/mount/losetup_linux_test.go:153–168  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

151}
152
153func TestAutoclearFalseLoop(t *testing.T) {
154 testutil.RequiresRoot(t)
155
156 dev := func() string {
157 backingFile := createTempFile(t)
158
159 file, err := SetupLoop(backingFile, LoopParams{Autoclear: false})
160 require.NoError(t, err)
161 dev := file.Name()
162 file.Close()
163 return dev
164 }()
165 time.Sleep(100 * time.Millisecond)
166 err := removeLoop(dev)
167 require.NoError(t, err)
168}

Callers

nothing calls this directly

Calls 5

SetupLoopFunction · 0.85
removeLoopFunction · 0.85
createTempFileFunction · 0.70
NameMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…