diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-09-03 20:07:34 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-10-01 20:14:51 +0000 |
| commit | a90d2b19fb0b8b7526a51b8bbeb9b887b84503e6 (patch) | |
| tree | 300c974e4a6dcc5f07ed429f65b196469496db40 /syz-cluster/pkg | |
| parent | 9a988f5c94cd83b07d5b39f6c1225333c0715d8d (diff) | |
syz-cluster: pass fuzz config to the fuzz step as json
Instead of passing the values individually, save the FuzzConfig object
as JSON and pass it as an artifact. This will simplify adding more new
fields.
Diffstat (limited to 'syz-cluster/pkg')
| -rw-r--r-- | syz-cluster/pkg/workflow/template.yaml | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/syz-cluster/pkg/workflow/template.yaml b/syz-cluster/pkg/workflow/template.yaml index 515adbd68..c253187e4 100644 --- a/syz-cluster/pkg/workflow/template.yaml +++ b/syz-cluster/pkg/workflow/template.yaml @@ -54,7 +54,7 @@ spec: - name: element steps: - - name: save-base-req - template: extract-request + template: convert-artifact arguments: parameters: - name: data @@ -71,12 +71,12 @@ spec: value: "{{workflow.parameters.session-id}}" artifacts: - name: request - from: "{{steps.save-base-req.outputs.artifacts.request}}" + from: "{{steps.save-base-req.outputs.artifacts.artifact}}" - - name: abort-if-base-build-failed template: exit-workflow when: "{{=jsonpath(steps['base-build'].outputs.parameters.result, '$.success') == false}}" - - name: save-patched-req - template: extract-request + template: convert-artifact arguments: parameters: - name: data @@ -113,7 +113,7 @@ spec: value: "{{workflow.parameters.session-id}}" artifacts: - name: request - from: "{{steps.save-patched-req.outputs.artifacts.request}}" + from: "{{steps.save-patched-req.outputs.artifacts.artifact}}" - - name: abort-if-patched-build-failed template: exit-workflow when: "{{=jsonpath(steps['patched-build'].outputs.parameters.result, '$.success') == false}}" @@ -137,39 +137,41 @@ spec: - - name: abort-if-patched-boot-failed template: exit-workflow when: "{{=jsonpath(steps['boot-test-patched'].outputs.parameters.result, '$.success') == false}}" + - - name: save-fuzz-config + template: convert-artifact + arguments: + parameters: + - name: data + value: "{{=jsonpath(inputs.parameters.element, '$')}}" - - name: fuzz templateRef: name: fuzz-step-template template: fuzz-step arguments: parameters: - - name: config - value: "{{=jsonpath(inputs.parameters.element, '$.config')}}" - name: patched-build-id value: "{{=jsonpath(steps['patched-build'].outputs.parameters.result, '$.build_id')}}" - name: base-build-id value: "{{=jsonpath(steps['base-build'].outputs.parameters.result, '$.build_id')}}" - - name: corpus-url - value: "{{=jsonpath(inputs.parameters.element, '$.corpus_url')}}" - - name: skip-cover-check - value: "{{=jsonpath(inputs.parameters.element, '$.skip_cover_check')}}" artifacts: - name: base-kernel from: "{{steps.base-build.outputs.artifacts.kernel}}" - name: patched-kernel from: "{{steps.patched-build.outputs.artifacts.kernel}}" - - name: extract-request + - name: config + from: "{{steps.save-fuzz-config.outputs.artifacts.artifact}}" + - name: convert-artifact inputs: parameters: - name: data outputs: artifacts: - - name: request - path: /tmp/request.json + - name: artifact + path: /tmp/artifact container: image: alpine:latest command: [sh, -c] - args: ["echo '{{inputs.parameters.data}}' > /tmp/request.json"] + args: ["echo '{{inputs.parameters.data}}' > /tmp/artifact"] - name: exit-workflow inputs: parameters: |
