diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-05-15 15:17:16 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-05-17 08:46:55 +0000 |
| commit | 15846cbccf63a4e74cce5b8cf0c1931fdcf81ccd (patch) | |
| tree | cc0f7740f5e2a84cf3c842e30bff93e926a00f6a /pkg/fuzzer/queue/queue.go | |
| parent | df04197b8da247c029f5966369849c8dd8122398 (diff) | |
pkg/ipc: use flatrpc flags
Flatrpc flags are passed in RPC execution requests,
so to avoid conversions and duplicate set of flags
use flatrpc flags in pkg/ipc directly.
Diffstat (limited to 'pkg/fuzzer/queue/queue.go')
| -rw-r--r-- | pkg/fuzzer/queue/queue.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/fuzzer/queue/queue.go b/pkg/fuzzer/queue/queue.go index 6ff94b9be..36226299a 100644 --- a/pkg/fuzzer/queue/queue.go +++ b/pkg/fuzzer/queue/queue.go @@ -11,6 +11,7 @@ import ( "sync" "sync/atomic" + "github.com/google/syzkaller/pkg/flatrpc" "github.com/google/syzkaller/pkg/hash" "github.com/google/syzkaller/pkg/ipc" "github.com/google/syzkaller/pkg/signal" @@ -102,15 +103,15 @@ func (r *Request) Risky() bool { } func (r *Request) Validate() error { - collectSignal := r.ExecOpts.ExecFlags&ipc.FlagCollectSignal > 0 + collectSignal := r.ExecOpts.ExecFlags&flatrpc.ExecFlagCollectSignal > 0 if r.ReturnAllSignal && !collectSignal { return fmt.Errorf("ReturnAllSignal is set, but FlagCollectSignal is not") } if r.SignalFilter != nil && !collectSignal { return fmt.Errorf("SignalFilter must be used with FlagCollectSignal") } - collectComps := r.ExecOpts.ExecFlags&ipc.FlagCollectComps > 0 - collectCover := r.ExecOpts.ExecFlags&ipc.FlagCollectCover > 0 + collectComps := r.ExecOpts.ExecFlags&flatrpc.ExecFlagCollectComps > 0 + collectCover := r.ExecOpts.ExecFlags&flatrpc.ExecFlagCollectCover > 0 if (collectComps) && (collectSignal || collectCover) { return fmt.Errorf("hint collection is mutually exclusive with signal/coverage") } |
