From 81b407fe4e14e1e40fa060509157143e51ec1739 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 11 Apr 2025 14:08:10 +0200 Subject: pkg/manager: wait until corpus is triaged for diff fuzzing Track the right moment to start bug reproductions more exactly: 1) Either once 90% of the corpus is triaged (*). 2) Or once we are past 50% of the time dedicated for fuzzing. Whatever happens earlier. (*) The last percents are usually quite slow and they bring much less covered PCs that all the previous ones. --- syz-cluster/workflow/fuzz-step/main.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'syz-cluster/workflow/fuzz-step') diff --git a/syz-cluster/workflow/fuzz-step/main.go b/syz-cluster/workflow/fuzz-step/main.go index f81a1791c..e5671e4fd 100644 --- a/syz-cluster/workflow/fuzz-step/main.go +++ b/syz-cluster/workflow/fuzz-step/main.go @@ -64,7 +64,7 @@ func main() { // the final test result back. runCtx, cancel := context.WithTimeout(context.Background(), d) defer cancel() - err = run(runCtx, client, artifactsDir) + err = run(runCtx, client, d, artifactsDir) status := api.TestPassed // TODO: what about TestFailed? if err != nil && !errors.Is(err, context.DeadlineExceeded) { app.Errorf("the step failed: %v", err) @@ -76,7 +76,7 @@ func main() { } } -func run(baseCtx context.Context, client *api.Client, artifactsDir string) error { +func run(baseCtx context.Context, client *api.Client, timeout time.Duration, artifactsDir string) error { series, err := client.GetSessionSeries(baseCtx, *flagSession) if err != nil { return fmt.Errorf("failed to query the series info: %w", err) @@ -124,9 +124,10 @@ func run(baseCtx context.Context, client *api.Client, artifactsDir string) error }) eg.Go(func() error { return manager.RunDiffFuzzer(ctx, base, patched, manager.DiffFuzzerConfig{ - Debug: false, - PatchedOnly: bugs, - ArtifactsDir: artifactsDir, + Debug: false, + PatchedOnly: bugs, + ArtifactsDir: artifactsDir, + MaxTriageTime: timeout / 2, }) }) const ( -- cgit mrf-deployment