From 9d5632407b527943dca5092877fa4a00e534cd98 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 10 Apr 2025 15:12:24 +0200 Subject: pkg/manager: make diff fuzzer artifacts folder configurable --- pkg/manager/diff.go | 7 ++++--- tools/syz-diff/diff.go | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/manager/diff.go b/pkg/manager/diff.go index bcdf0dfcb..93922859b 100644 --- a/pkg/manager/diff.go +++ b/pkg/manager/diff.go @@ -37,8 +37,9 @@ import ( ) type DiffFuzzerConfig struct { - Debug bool - PatchedOnly chan *UniqueBug + Debug bool + PatchedOnly chan *UniqueBug + ArtifactsDir string // Where to store the artifacts that supplement the logs. } type UniqueBug struct { @@ -73,7 +74,7 @@ func RunDiffFuzzer(ctx context.Context, baseCfg, newCfg *mgrconfig.Config, cfg D base.source = stream new.duplicateInto = stream - store := &DiffFuzzerStore{BasePath: new.cfg.Workdir} + store := &DiffFuzzerStore{BasePath: cfg.ArtifactsDir} diffCtx := &diffContext{ doneRepro: make(chan *ReproResult), base: base, diff --git a/tools/syz-diff/diff.go b/tools/syz-diff/diff.go index f962bbf16..f28421dc9 100644 --- a/tools/syz-diff/diff.go +++ b/tools/syz-diff/diff.go @@ -48,7 +48,8 @@ func main() { ctx := vm.ShutdownCtx() err = manager.RunDiffFuzzer(ctx, baseCfg, newCfg, manager.DiffFuzzerConfig{ - Debug: *flagDebug, + ArtifactsDir: newCfg.Workdir, + Debug: *flagDebug, }) if err != nil { log.Fatal(err) -- cgit mrf-deployment