MCPcopy
hub / github.com/containerd/containerd / populateBlobStore

Function populateBlobStore

contrib/fuzz/content_fuzz_test.go:82–95  ·  view source on GitHub ↗

populateBlobStore creates a bunch of blobs

(ctx context.Context, cs content.Store, f *fuzz.ConsumeFuzzer)

Source from the content-addressed store, hash-verified

80
81// populateBlobStore creates a bunch of blobs
82func populateBlobStore(ctx context.Context, cs content.Store, f *fuzz.ConsumeFuzzer) (map[digest.Digest][]byte, error) {
83 blobs, err := generateBlobs(f)
84 if err != nil {
85 return nil, err
86 }
87
88 for dgst, p := range blobs {
89 _, err := checkWrite(ctx, cs, dgst, p)
90 if err != nil {
91 return blobs, err
92 }
93 }
94 return blobs, nil
95}
96
97// FuzzCSWalk implements a fuzzer that targets contentStore.Walk()
98func FuzzCSWalk(f *testing.F) {

Callers 2

FuzzCSWalkFunction · 0.70
FuzzArchiveExportFunction · 0.70

Calls 2

generateBlobsFunction · 0.70
checkWriteFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…