MCPcopy
hub / github.com/containerd/containerd / containerStatsFuzz

Function containerStatsFuzz

contrib/fuzz/cri_server_fuzz_test.go:239–249  ·  view source on GitHub ↗

containerStatsFuzz creates a ContainerStatsRequest and passes it to c.ContainerStats

(c fuzzCRIService, f *fuzz.ConsumeFuzzer)

Source from the content-addressed store, hash-verified

237// containerStatsFuzz creates a ContainerStatsRequest and passes
238// it to c.ContainerStats
239func containerStatsFuzz(c fuzzCRIService, f *fuzz.ConsumeFuzzer) error {
240 r := &runtime.ContainerStatsRequest{}
241 err := f.GenerateStruct(r)
242 if err != nil {
243 return err
244 }
245 _, _ = c.ContainerStats(context.Background(), r)
246 reqString := fmt.Sprintf("%+v", r)
247 logExecution("c.ContainerStats", reqString)
248 return nil
249}
250
251// listContainerStatsFuzz creates a ListContainerStatsRequest and
252// passes it to c.ListContainerStats

Callers

nothing calls this directly

Calls 2

logExecutionFunction · 0.85
ContainerStatsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…