From 9a988f5c94cd83b07d5b39f6c1225333c0715d8d Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 3 Sep 2025 16:17:08 +0200 Subject: syz-cluster: support multiple fuzz tasks Adjut the workflow template and the API to run multiple fuzzing campaigns as a part of single patch series processing. --- syz-cluster/pkg/api/api.go | 2 +- syz-cluster/pkg/workflow/template.yaml | 3 ++- syz-cluster/workflow/triage-step/main.go | 13 +++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/syz-cluster/pkg/api/api.go b/syz-cluster/pkg/api/api.go index 5d1c4ed82..49a5a7f45 100644 --- a/syz-cluster/pkg/api/api.go +++ b/syz-cluster/pkg/api/api.go @@ -10,7 +10,7 @@ type TriageResult struct { // If set, ignore the patch series completely. SkipReason string `json:"skip_reason"` // Fuzzing configuration to try (NULL if nothing). - Fuzz *FuzzTask `json:"fuzz"` + Fuzz []*FuzzTask `json:"fuzz"` } // The data layout faclitates the simplicity of the workflow definition. diff --git a/syz-cluster/pkg/workflow/template.yaml b/syz-cluster/pkg/workflow/template.yaml index bd2f3b0f3..515adbd68 100644 --- a/syz-cluster/pkg/workflow/template.yaml +++ b/syz-cluster/pkg/workflow/template.yaml @@ -44,7 +44,8 @@ spec: arguments: parameters: - name: element - value: "{{=jsonpath(steps['run-triage'].outputs.parameters.result, '$.fuzz')}}" + value: "{{item}}" + withParam: "{{=jsonpath(steps['run-triage'].outputs.parameters.result, '$.fuzz')}}" continueOn: failed: true - name: process-fuzz diff --git a/syz-cluster/workflow/triage-step/main.go b/syz-cluster/workflow/triage-step/main.go index c0cfda3b4..cecc3ada8 100644 --- a/syz-cluster/workflow/triage-step/main.go +++ b/syz-cluster/workflow/triage-step/main.go @@ -117,14 +117,15 @@ func getVerdict(ctx context.Context, tracer debugtracer.DebugTracer, client *api CommitHash: result.Commit, Arch: arch, } + fuzz := &api.FuzzTask{ + Base: base, + Patched: base, + FuzzConfig: fuzzConfig.FuzzConfig, + } + fuzz.Patched.SeriesID = series.ID triageResult = &api.TriageResult{ - Fuzz: &api.FuzzTask{ - Base: base, - Patched: base, - FuzzConfig: fuzzConfig.FuzzConfig, - }, + Fuzz: []*api.FuzzTask{fuzz}, } - triageResult.Fuzz.Patched.SeriesID = series.ID break } return triageResult, nil -- cgit mrf-deployment