MCPcopy Index your code
hub / github.com/containerd/containerd / TestAttachDetachLoopDevice

Function TestAttachDetachLoopDevice

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

Source from the content-addressed store, hash-verified

90}
91
92func TestAttachDetachLoopDevice(t *testing.T) {
93 testutil.RequiresRoot(t)
94
95 path := createTempFile(t)
96
97 dev, err := AttachLoopDevice(path)
98 require.NoError(t, err)
99
100 err = DetachLoopDevice(dev)
101 require.NoError(t, err)
102}
103
104func TestAutoclearTrueLoop(t *testing.T) {
105 testutil.RequiresRoot(t)

Callers

nothing calls this directly

Calls 3

AttachLoopDeviceFunction · 0.85
DetachLoopDeviceFunction · 0.85
createTempFileFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…