From a10940b81777718365ee7f71495abdc69a32285b Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 7 May 2024 19:11:42 +0200 Subject: pkg/runtest: use queue.Request and queue.Result There's no need to duplicate the execution mechanisms. --- pkg/fuzzer/queue/queue.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/fuzzer/queue') diff --git a/pkg/fuzzer/queue/queue.go b/pkg/fuzzer/queue/queue.go index 0c1735243..14d4ace78 100644 --- a/pkg/fuzzer/queue/queue.go +++ b/pkg/fuzzer/queue/queue.go @@ -36,6 +36,10 @@ type Request struct { // This stat will be incremented on request completion. Stat *stats.Val + // Options needed by runtest. + BinaryFile string // If set, it's executed instead of Prog. + Repeat int // Repeats in addition to the first run. + // The callback will be called on request completion in the LIFO order. // If it returns false, all further processing will be stopped. // It allows wrappers to intercept Done() requests. @@ -123,7 +127,7 @@ type Result struct { Info *ipc.ProgInfo Output []byte Status Status - Error string // More details in case of ExecFailure. + Err error // More details in case of ExecFailure. } func (r *Result) clone() *Result { -- cgit mrf-deployment