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

Function runContainerOk

libcontainer/integration/utils_test.go:213–225  ·  view source on GitHub ↗

runContainerOk is a wrapper for runContainer, simplifying its use for cases when the run is expected to succeed and return exit code of 0.

(t testing.TB, config *configs.Config, args ...string)

Source from the content-addressed store, hash-verified

211// runContainerOk is a wrapper for runContainer, simplifying its use for cases
212// when the run is expected to succeed and return exit code of 0.
213func runContainerOk(t testing.TB, config *configs.Config, args ...string) *stdBuffers {
214 buffers, exitCode, err := runContainer(t, config, args...)
215
216 t.Helper()
217 if err != nil {
218 t.Fatalf("%s: %s", buffers, err)
219 }
220 if exitCode != 0 {
221 t.Fatalf("exit code not 0. code %d stderr %q", exitCode, buffers.Stderr)
222 }
223
224 return buffers
225}
226
227func destroyContainer(container *libcontainer.Container) {
228 _ = container.Destroy()

Callers 15

testExecPSFunction · 0.85
TestIPCPrivateFunction · 0.85
TestIPCHostFunction · 0.85
TestIPCJoinPathFunction · 0.85
testRlimitFunction · 0.85
testPidsFunction · 0.85
TestMountCgroupROFunction · 0.85
TestMountCgroupRWFunction · 0.85
TestSTDIOPermissionsFunction · 0.85
TestPIDHostFunction · 0.85
TestCGROUPPrivateFunction · 0.85
TestCGROUPHostFunction · 0.85

Calls 1

runContainerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…