MCPcopy Create free account
hub / github.com/containerd/nerdctl / writeTestCDISpec

Function writeTestCDISpec

cmd/nerdctl/container/container_run_linux_test.go:881–887  ·  view source on GitHub ↗
(t *testing.T, spec string, fileName string, cdiSpecDir string)

Source from the content-addressed store, hash-verified

879}
880
881func writeTestCDISpec(t *testing.T, spec string, fileName string, cdiSpecDir string) {
882 err := os.MkdirAll(cdiSpecDir, 0o700)
883 assert.NilError(t, err)
884 cdiSpecPath := filepath.Join(cdiSpecDir, fileName)
885 err = os.WriteFile(cdiSpecPath, []byte(spec), 0o400)
886 assert.NilError(t, err)
887}
888
889func TestSharedIpcSetup(t *testing.T) {
890 nerdtest.Setup()

Callers 4

TestRunDeviceCDIFunction · 0.85
TestRunGPUFunction · 0.85

Calls 1

WriteFileMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…