diff options
| author | Zubin Mithra <zsm@chromium.org> | 2019-11-04 12:28:13 -0800 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-11-05 09:15:56 +0100 |
| commit | a77e6539d9a657d582fa3167b8bc049feb2bd1fb (patch) | |
| tree | 5ab76f3783f24d8b933aefd1ea7bf36c49f8123c | |
| parent | 0a2d7d829341f42f7df148a6623428283a30821f (diff) | |
syz-ci: send build info for failed bisections
* When fix bisections fails due to a crash on HEAD, the dashboard needs to
keep track of which commit the crash occured at. In order to do this,
send correct commit information to the dashboard.
* Modify mail_bisect_result.txt to be clearer on what
BisectResult.KernelCommit represents. Modify test in bisect_test.go to
accommodate the changes in templates.
| -rw-r--r-- | dashboard/app/bisect_test.go | 2 | ||||
| -rw-r--r-- | dashboard/app/mail_bisect_result.txt | 2 | ||||
| -rw-r--r-- | syz-ci/jobs.go | 8 |
3 files changed, 9 insertions, 3 deletions
diff --git a/dashboard/app/bisect_test.go b/dashboard/app/bisect_test.go index 2c401c6e4..0512ab9fc 100644 --- a/dashboard/app/bisect_test.go +++ b/dashboard/app/bisect_test.go @@ -586,7 +586,7 @@ func TestBisectCauseAncient(t *testing.T) { c.expectEQ(msg.Body, fmt.Sprintf(`Bisection is inconclusive: the bug happens on the oldest tested release. bisection log: %[2]v -start commit: 11111111 kernel_commit_title1 +oldest commit: 11111111 kernel_commit_title1 git tree: repo1 branch1 final crash: %[3]v console output: %[4]v diff --git a/dashboard/app/mail_bisect_result.txt b/dashboard/app/mail_bisect_result.txt index 8c893440f..aa60b0848 100644 --- a/dashboard/app/mail_bisect_result.txt +++ b/dashboard/app/mail_bisect_result.txt @@ -12,7 +12,7 @@ Date: {{formatKernelTime $bisect.Commit.Date}} {{else}}Bisection is inconclusive: the bug happens on the {{if $bisect.Fix}}latest{{else}}oldest{{end}} tested release. {{end}} bisection log: {{$bisect.LogLink}} -start commit: {{formatShortHash $br.KernelCommit}} {{formatCommitTableTitle $br.KernelCommitTitle}} +{{if $bisect.Commit}}start commit: {{else if $bisect.Commits}}start commit: {{else}}{{if $bisect.Fix}}latest commit: {{else}}oldest commit: {{end}}{{end}}{{formatShortHash $br.KernelCommit}} {{formatCommitTableTitle $br.KernelCommitTitle}} git tree: {{$br.KernelRepoAlias}} {{if $bisect.CrashReportLink}}final crash: {{$bisect.CrashReportLink}} {{end}}{{if $bisect.CrashLogLink}}console output: {{$bisect.CrashLogLink}} diff --git a/syz-ci/jobs.go b/syz-ci/jobs.go index 42647be48..b6fb28a07 100644 --- a/syz-ci/jobs.go +++ b/syz-ci/jobs.go @@ -397,7 +397,7 @@ func (jp *JobProcessor) bisect(job *Job, mgrcfg *mgrconfig.Config) error { Manager: *mgrcfg, } - commits, rep, _, err := bisect.Run(cfg) + commits, rep, com, err := bisect.Run(cfg) resp.Log = trace.Bytes() if err != nil { return err @@ -418,6 +418,12 @@ func (jp *JobProcessor) bisect(job *Job, mgrcfg *mgrconfig.Config) error { resp.CrashLog = rep.Output if len(resp.Commits) != 0 { resp.Commits[0].CC = append(resp.Commits[0].CC, rep.Maintainers...) + } else { + // If there is a report ahd there is no commit, it means a crash + // occurred on HEAD(for BisectFix) and oldest tested release(for BisectCause). + resp.Build.KernelCommit = com.Hash + resp.Build.KernelCommitDate = com.Date + resp.Build.KernelCommitTitle = com.Title } } return nil |
