diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-03-19 14:54:19 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-03-19 14:22:23 +0000 |
| commit | 972d94f8bee0e06c8785470ff7f04434fe2fa82e (patch) | |
| tree | 763d51def5f3ae1cbd666e23d6b9195012e07f08 /pkg/fuzzer | |
| parent | 70ea129de66278631e12681d4e18d560aa717d4e (diff) | |
pkg/fuzzer: don't use NewInputs in tests
This functionality will soon be deleted. Rely on the Corpus object
updates.
Diffstat (limited to 'pkg/fuzzer')
| -rw-r--r-- | pkg/fuzzer/fuzzer_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
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) } } }() |
