From 972d94f8bee0e06c8785470ff7f04434fe2fa82e Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 19 Mar 2024 14:54:19 +0100 Subject: pkg/fuzzer: don't use NewInputs in tests This functionality will soon be deleted. Rely on the Corpus object updates. --- pkg/fuzzer/fuzzer_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pkg/fuzzer/fuzzer_test.go') diff --git a/pkg/fuzzer/fuzzer_test.go b/pkg/fuzzer/fuzzer_test.go index f92b5b3fc..ed64a803f 100644 --- a/pkg/fuzzer/fuzzer_test.go +++ b/pkg/fuzzer/fuzzer_test.go @@ -40,9 +40,10 @@ func TestFuzz(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() + corpusUpdates := make(chan corpus.NewItemEvent) fuzzer := NewFuzzer(ctx, &Config{ Debug: true, - Corpus: corpus.NewCorpus(ctx), + Corpus: corpus.NewMonitoredCorpus(ctx, corpusUpdates), Logf: func(level int, msg string, args ...interface{}) { if level > 1 { return @@ -61,8 +62,8 @@ func TestFuzz(t *testing.T) { select { case <-ctx.Done(): return - case c := <-fuzzer.Config.NewInputs: - t.Logf("new prog:\n%s", c.Prog) + case u := <-corpusUpdates: + t.Logf("new prog:\n%s", u.ProgData) } } }() -- cgit mrf-deployment