From d7bc58204ea84ccb2ed541dd26a6b6d8bc326f5d Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 17 Jan 2018 19:43:04 +0100 Subject: dashboard/app: collect more info for better reports Collect kernel build commit title/date. Add support for kernel repo aliases (to be able to say linux-next instead of full git repo address). Collect on what managers a bug happened. Reuse Crash.ReportLen as generic crash reporting priority. Make it possible to prioritize reporting of particular kernel repos and arches. Fixes #473 --- dashboard/app/reporting_test.go | 62 ++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 28 deletions(-) (limited to 'dashboard/app/reporting_test.go') diff --git a/dashboard/app/reporting_test.go b/dashboard/app/reporting_test.go index bd743f33a..dbba2e626 100644 --- a/dashboard/app/reporting_test.go +++ b/dashboard/app/reporting_test.go @@ -46,20 +46,23 @@ func TestReportBug(t *testing.T) { t.Fatalf("empty report ID") } want := &dashapi.BugReport{ - Namespace: "test1", - Config: []byte(`{"Index":1}`), - ID: rep.ID, - First: true, - Title: "title1", - Maintainers: []string{"bar@foo.com", "foo@bar.com"}, - CompilerID: "compiler1", - KernelRepo: "repo1", - KernelBranch: "branch1", - KernelCommit: "kernel_commit1", - KernelConfig: []byte("config1"), - Log: []byte("log1"), - Report: []byte("report1"), - CrashID: rep.CrashID, + Namespace: "test1", + Config: []byte(`{"Index":1}`), + ID: rep.ID, + First: true, + Title: "title1", + Maintainers: []string{"bar@foo.com", "foo@bar.com"}, + CompilerID: "compiler1", + KernelRepo: "repo1", + KernelRepoAlias: "repo1/branch1", + KernelBranch: "branch1", + KernelCommit: "kernel_commit1", + KernelCommitTitle: build.KernelCommitTitle, + KernelCommitDate: buildCommitDate, + KernelConfig: []byte("config1"), + Log: []byte("log1"), + Report: []byte("report1"), + CrashID: rep.CrashID, } c.expectEQ(rep, want) @@ -214,20 +217,23 @@ func TestInvalidBug(t *testing.T) { t.Fatalf("empty report ID") } want := &dashapi.BugReport{ - Namespace: "test1", - Config: []byte(`{"Index":1}`), - ID: rep.ID, - First: true, - Title: "title1 (2)", - CompilerID: "compiler1", - KernelRepo: "repo1", - KernelBranch: "branch1", - KernelCommit: "kernel_commit1", - KernelConfig: []byte("config1"), - Log: []byte("log2"), - Report: []byte("report2"), - ReproC: []byte("int main() { return 1; }"), - CrashID: rep.CrashID, + Namespace: "test1", + Config: []byte(`{"Index":1}`), + ID: rep.ID, + First: true, + Title: "title1 (2)", + CompilerID: "compiler1", + KernelRepo: "repo1", + KernelRepoAlias: "repo1/branch1", + KernelBranch: "branch1", + KernelCommit: "kernel_commit1", + KernelCommitTitle: build.KernelCommitTitle, + KernelCommitDate: buildCommitDate, + KernelConfig: []byte("config1"), + Log: []byte("log2"), + Report: []byte("report2"), + ReproC: []byte("int main() { return 1; }"), + CrashID: rep.CrashID, } c.expectEQ(rep, want) -- cgit mrf-deployment