Copy fuzzers from github.com/cncf/cncf-fuzzing

This commit copies the fuzzers from the repository except for
containerd_import_structured_fuzzer.go.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato
2022-07-01 16:38:04 +00:00
parent b316318596
commit e9e33f847d
13 changed files with 505 additions and 38 deletions

View File

@@ -291,20 +291,6 @@ func populateBlobStore(ctx context.Context, t checker, cs content.Store, nblobs,
return blobs
}
func contentStoreEnv(t testing.TB) (context.Context, string, content.Store, func()) {
tmpdir := t.TempDir()
cs, err := NewStore(tmpdir)
if err != nil {
t.Fatal(err)
}
ctx, cancel := context.WithCancel(context.Background())
return ctx, tmpdir, cs, func() {
cancel()
}
}
func checkCopy(t checker, size int64, dst io.Writer, src io.Reader) {
nn, err := io.Copy(dst, src)
if err != nil {