MCPcopy
hub / github.com/opencontainers/runc / TestCheckMountDestInProc

Function TestCheckMountDestInProc

libcontainer/rootfs_linux_test.go:11–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestCheckMountDestInProc(t *testing.T) {
12 m := mountEntry{
13 Mount: &configs.Mount{
14 Destination: "/proc/sys",
15 Source: "/proc/sys",
16 Device: "bind",
17 Flags: unix.MS_BIND,
18 },
19 }
20 dest := "/rootfs/proc/sys"
21 err := checkProcMount("/rootfs", dest, m)
22 if err == nil {
23 t.Fatal("destination inside proc should return an error")
24 }
25}
26
27func TestCheckProcMountOnProc(t *testing.T) {
28 m := mountEntry{

Callers

nothing calls this directly

Calls 1

checkProcMountFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…