diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2023-08-02 18:53:35 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2023-08-03 08:55:26 +0000 |
| commit | b95100df5e0793a76c9cadcacb15ef186ad350cd (patch) | |
| tree | 7fb7eb37f2df1bdae3474b8cfb4de6bdce39a700 /syz-ci/jobs.go | |
| parent | 39a91c1806bfc2087977dbe31529c34219a8aba6 (diff) | |
syz-ci: specify custom ignore lists for bisections
Make syz-ci configuration more flexible by allowing users to set the
list of commits that should never be reported as valid bisection
results.
Keep the list of such upstream Linux commits in the code in order not to
duplicate it everywhere.
Diffstat (limited to 'syz-ci/jobs.go')
| -rw-r--r-- | syz-ci/jobs.go | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/syz-ci/jobs.go b/syz-ci/jobs.go index 8df869397..f9851edfb 100644 --- a/syz-ci/jobs.go +++ b/syz-ci/jobs.go @@ -553,16 +553,8 @@ func (jp *JobProcessor) bisect(job *Job, mgrcfg *mgrconfig.Config) error { if res.Confidence < confidenceCutOff { resp.Flags |= dashapi.BisectResultIgnore } - ignoredCommits := []string{ - // Commit "usb: gadget: add raw-gadget interface" adds a kernel interface for - // triggering USB bugs, which ends up being the guilty commit during bisection - // for USB bugs introduced before it. - "f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10", - } - for _, commit := range ignoredCommits { - if res.Commits[0].Hash == commit { - resp.Flags |= dashapi.BisectResultIgnore - } + if jp.ignoreBisectCommit(res.Commits[0]) { + resp.Flags |= dashapi.BisectResultIgnore } } if res.Report != nil { @@ -583,6 +575,24 @@ func (jp *JobProcessor) bisect(job *Job, mgrcfg *mgrconfig.Config) error { return nil } +var ignoredCommits = []string{ + // Commit "usb: gadget: add raw-gadget interface" adds a kernel interface for + // triggering USB bugs, which ends up being the guilty commit during bisection + // for USB bugs introduced before it. + "f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10", +} + +func (jp *JobProcessor) ignoreBisectCommit(commit *vcs.Commit) bool { + // First look at the always ignored values. + for _, hash := range ignoredCommits { + if commit.Hash == hash { + return true + } + } + _, ok := jp.cfg.BisectIgnore[commit.Hash] + return ok +} + func (jp *JobProcessor) testPatch(job *Job, mgrcfg *mgrconfig.Config) error { req, resp, mgr := job.req, job.resp, job.mgr env, err := instance.NewEnv(mgrcfg, buildSem, testSem) |
