github.com/moby/docker@v26.1.3+incompatible/daemon/logger/jsonfilelog/jsonlog/fuzz_test.go (about) 1 package jsonlog 2 3 import ( 4 "bytes" 5 "testing" 6 7 fuzz "github.com/AdaLogics/go-fuzz-headers" 8 ) 9 10 func FuzzJSONLogsMarshalJSONBuf(f *testing.F) { 11 f.Fuzz(func(t *testing.T, data []byte) { 12 ff := fuzz.NewConsumer(data) 13 l := &JSONLogs{} 14 err := ff.GenerateStruct(l) 15 if err != nil { 16 return 17 } 18 var buf bytes.Buffer 19 l.MarshalJSONBuf(&buf) 20 }) 21 }