From b0d99d1ebba0827d4ef2559f95b94bf7d941a2cf Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 8 Mar 2018 12:24:03 +0100 Subject: syz-ci: add config parameter that enables jobs If a syz-ci is not meant to do patch testing, it's better to not start jobs polling loop at all. --- syz-ci/syz-ci.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/syz-ci/syz-ci.go b/syz-ci/syz-ci.go index 94eec3427..c5efc7bbc 100644 --- a/syz-ci/syz-ci.go +++ b/syz-ci/syz-ci.go @@ -79,6 +79,7 @@ type Config struct { Syzkaller_Repo string Syzkaller_Branch string Syzkaller_Descriptions string // Dir with additional syscall descriptions (.txt and .const files). + Enable_Jobs bool // Enable patch testing jobs. Managers []*ManagerConfig } @@ -132,7 +133,6 @@ func main() { for i, mgrcfg := range cfg.Managers { managers[i] = createManager(cfg, mgrcfg, stop) } - jp := newJobProcessor(cfg, managers) for _, mgr := range managers { mgr := mgr wg.Add(1) @@ -141,11 +141,14 @@ func main() { mgr.loop() }() } - wg.Add(1) - go func() { - defer wg.Done() - jp.loop(stop) - }() + if cfg.Enable_Jobs { + jp := newJobProcessor(cfg, managers) + wg.Add(1) + go func() { + defer wg.Done() + jp.loop(stop) + }() + } wg.Wait() -- cgit mrf-deployment