From 72b08b89bcde266d8ec4abc77b01fcc0cc95bea0 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 15 Apr 2025 15:40:27 +0200 Subject: pkg/manager: provide diff fuzzer state dumps Make the fuzzing step of syz-cluster create the manager.DiffStore object explicitly and dump its state to the logs after finishing the fuzzing session. --- pkg/manager/diff.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/manager/diff.go') diff --git a/pkg/manager/diff.go b/pkg/manager/diff.go index d0cb33aa3..379fd246c 100644 --- a/pkg/manager/diff.go +++ b/pkg/manager/diff.go @@ -39,6 +39,7 @@ import ( type DiffFuzzerConfig struct { Debug bool PatchedOnly chan *UniqueBug + Store *DiffFuzzerStore ArtifactsDir string // Where to store the artifacts that supplement the logs. // The fuzzer waits no more than MaxTriageTime time until it starts taking VMs away // for bug reproduction. @@ -82,13 +83,12 @@ func RunDiffFuzzer(ctx context.Context, baseCfg, newCfg *mgrconfig.Config, cfg D base.source = stream new.duplicateInto = stream - store := &DiffFuzzerStore{BasePath: cfg.ArtifactsDir} diffCtx := &diffContext{ cfg: cfg, doneRepro: make(chan *ReproResult), base: base, new: new, - store: store, + store: cfg.Store, reproAttempts: map[string]int{}, patchedOnly: cfg.PatchedOnly, } @@ -96,7 +96,7 @@ func RunDiffFuzzer(ctx context.Context, baseCfg, newCfg *mgrconfig.Config, cfg D diffCtx.http = &HTTPServer{ Cfg: newCfg, StartTime: time.Now(), - DiffStore: store, + DiffStore: cfg.Store, Pools: map[string]*vm.Dispatcher{ new.name: new.pool, base.name: base.pool, -- cgit mrf-deployment