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

Function TestIPCJoinPath

libcontainer/integration/exec_test.go:89–104  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

87}
88
89func TestIPCJoinPath(t *testing.T) {
90 if testing.Short() {
91 return
92 }
93
94 l, err := os.Readlink("/proc/1/ns/ipc")
95 ok(t, err)
96
97 config := newTemplateConfig(t, nil)
98 config.Namespaces.Add(configs.NEWIPC, "/proc/1/ns/ipc")
99 buffers := runContainerOk(t, config, "readlink", "-v", "/proc/self/ns/ipc")
100
101 if actual := strings.Trim(buffers.Stdout.String(), "\n"); actual != l {
102 t.Fatalf("ipc link not equal to host link %q %q", actual, l)
103 }
104}
105
106func TestIPCBadPath(t *testing.T) {
107 if testing.Short() {

Callers

nothing calls this directly

Calls 5

okFunction · 0.85
newTemplateConfigFunction · 0.85
runContainerOkFunction · 0.85
AddMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…