MCPcopy
hub / github.com/containerd/containerd / FuzzConvertManifest

Function FuzzConvertManifest

core/remotes/docker/converter_fuzz_test.go:29–50  ·  view source on GitHub ↗
(f *testing.F)

Source from the content-addressed store, hash-verified

27)
28
29func FuzzConvertManifest(f *testing.F) {
30 f.Fuzz(func(t *testing.T, data []byte) {
31 ctx := context.Background()
32
33 // Do not log the message below
34 // level=warning msg="do nothing for media type: ..."
35 log.G(ctx).Logger.SetLevel(log.PanicLevel)
36
37 f := fuzz.NewConsumer(data)
38 desc := ocispec.Descriptor{}
39 err := f.GenerateStruct(&desc)
40 if err != nil {
41 return
42 }
43 tmpdir := t.TempDir()
44 cs, err := local.NewStore(tmpdir)
45 if err != nil {
46 return
47 }
48 _, _ = ConvertManifest(ctx, cs, desc)
49 })
50}

Callers

nothing calls this directly

Calls 2

NewStoreFunction · 0.92
ConvertManifestFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…