Lines Matching refs:mgr
56 mgr := &Manager{
69 s, err := rpctype.NewRPCServer(cfg.RPC, mgr)
73 mgr.port = s.Addr().(*net.TCPAddr).Port
84 rep, err := mgr.boot(name, i)
91 if err := mgr.finishRequest(name, rep); err != nil {
97 mgr.checkResult = <-mgr.checkResultC
98 close(mgr.checkResultReady)
100 for sandbox, ids := range mgr.checkResult.EnabledCalls {
107 for _, feat := range mgr.checkResult.Features {
116 Features: mgr.checkResult.Features,
118 Requests: mgr.requests,
149 func (mgr *Manager) boot(name string, index int) (*report.Report, error) {
150 inst, err := mgr.vmPool.Create(index)
156 fwdAddr, err := inst.Forward(mgr.port)
160 fuzzerBin, err := inst.Copy(mgr.cfg.SyzFuzzerBin)
164 executorBin, err := inst.Copy(mgr.cfg.SyzExecutorBin)
169 mgr.cfg.TargetOS, mgr.cfg.TargetArch, fwdAddr, mgr.cfg.Sandbox, mgr.cfg.Procs, 0,
170 mgr.cfg.Cover, mgr.debug, false, true)
171 outc, errc, err := inst.Run(time.Hour, mgr.vmStop, cmd)
175 rep := inst.MonitorExecution(outc, errc, mgr.reporter, true)
179 func (mgr *Manager) finishRequest(name string, rep *report.Report) error {
180 mgr.reqMu.Lock()
181 defer mgr.reqMu.Unlock()
182 lastReq := mgr.lastReq[name]
183 req := mgr.reqMap[lastReq]
187 delete(mgr.reqMap, lastReq)
188 delete(mgr.lastReq, name)
198 func (mgr *Manager) Connect(a *rpctype.ConnectArgs, r *rpctype.ConnectRes) error {
200 r.TargetRevision = mgr.target.Revision
203 case <-mgr.checkResultReady:
204 r.CheckResult = mgr.checkResult
210 func (mgr *Manager) Check(a *rpctype.CheckArgs, r *int) error {
215 case mgr.checkResultC <- a:
221 func (mgr *Manager) Poll(a *rpctype.RunTestPollReq, r *rpctype.RunTestPollRes) error {
222 req := <-mgr.requests
226 mgr.reqMu.Lock()
227 if mgr.lastReq[a.Name] != 0 {
230 mgr.reqSeq++
231 r.ID = mgr.reqSeq
232 mgr.reqMap[mgr.reqSeq] = req
233 mgr.lastReq[a.Name] = mgr.reqSeq
234 mgr.reqMu.Unlock()
250 func (mgr *Manager) Done(a *rpctype.RunTestDoneArgs, r *int) error {
251 mgr.reqMu.Lock()
252 lastReq := mgr.lastReq[a.Name]
256 req := mgr.reqMap[a.ID]
257 delete(mgr.reqMap, a.ID)
258 delete(mgr.lastReq, a.Name)
259 mgr.reqMu.Unlock()