From b1dad173ed7da74feb273f0397de0f4a4ff759e7 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 4 Jul 2024 19:06:28 +0200 Subject: [PATCH] pkg/rpcserver: don't fail requests in LocalRun It's assumed that the caller would use a context to control waits on individual requests. --- pkg/rpcserver/local.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/pkg/rpcserver/local.go b/pkg/rpcserver/local.go index 27c0aac4a3f0..d30e3acfc8a9 100644 --- a/pkg/rpcserver/local.go +++ b/pkg/rpcserver/local.go @@ -5,11 +5,9 @@ package rpcserver import ( "context" - "errors" "fmt" "os" "os/exec" - "time" "github.com/google/syzkaller/pkg/cover" "github.com/google/syzkaller/pkg/flatrpc" @@ -100,23 +98,6 @@ func RunLocal(cfg *LocalConfig) error { cmd.Process.Kill() <-res } - if !cfg.HandleInterrupts { - // If the executor has crashed early, reply to all remaining requests to unblock tests. - loop: - for { - req := serv.execSource.Next() - if req == nil { - select { - case <-cfg.Context.Done(): - break loop - default: - time.Sleep(time.Millisecond) - continue loop - } - } - req.Done(&queue.Result{Status: queue.ExecFailure, Err: errors.New("executor crashed")}) - } - } return cmdErr }