From 8ba049b23119999229bc89e501f61f54a409857d Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 31 May 2024 17:12:09 +0200 Subject: pkg/fuzzer: improve handling of signal for non-target calls During deflake/minimization we have 1 target call that should be handled specially: during triage we want all signal, during minimization we want new+target signal. For the rest of the calls we can do normal handling: collect new signal and start triage if we see any new signal. --- pkg/fuzzer/queue/queue.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pkg/fuzzer/queue/queue.go') diff --git a/pkg/fuzzer/queue/queue.go b/pkg/fuzzer/queue/queue.go index cb70f5a9b..46df9d234 100644 --- a/pkg/fuzzer/queue/queue.go +++ b/pkg/fuzzer/queue/queue.go @@ -27,9 +27,8 @@ type Request struct { SignalFilter signal.Signal SignalFilterCall int - // By default, only the newly seen signal is returned. - // ReturnAllSignal tells the executor to return everything. - ReturnAllSignal bool + // Return all signal for these calls instead of new signal. + ReturnAllSignal []int ReturnError bool ReturnOutput bool @@ -103,7 +102,7 @@ func (r *Request) Risky() bool { func (r *Request) Validate() error { collectSignal := r.ExecOpts.ExecFlags&flatrpc.ExecFlagCollectSignal > 0 - if r.ReturnAllSignal && !collectSignal { + if len(r.ReturnAllSignal) != 0 && !collectSignal { return fmt.Errorf("ReturnAllSignal is set, but FlagCollectSignal is not") } if r.SignalFilter != nil && !collectSignal { -- cgit mrf-deployment