aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-03-28 17:01:21 +0200
committerAleksandr Nogikh <wp32pw@gmail.com>2023-03-28 17:31:22 +0200
commit5232cf0254feea67f22bebab12e4302bb37f74f6 (patch)
tree257a283ee23e2b617ce971a6ae22a9ac4feee1f5 /dashboard/app
parent811086ce0bf9629c50ee5bf27211d9d63a193baf (diff)
dashboard: share repro level and report link in SimilarBugInfo
This will make FullBugInfo's contents much more useful.
Diffstat (limited to 'dashboard/app')
-rw-r--r--dashboard/app/reporting.go12
-rw-r--r--dashboard/app/reporting_test.go29
2 files changed, 32 insertions, 9 deletions
diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go
index 6d6abc17a..216bcca0e 100644
--- a/dashboard/app/reporting.go
+++ b/dashboard/app/reporting.go
@@ -1324,11 +1324,13 @@ func loadFullBugInfo(c context.Context, bug *Bug, bugKey *db.Key,
return nil, err
}
ret.SimilarBugs = append(ret.SimilarBugs, &dashapi.SimilarBugInfo{
- Title: similarBug.displayTitle(),
- Status: status,
- Namespace: similarBug.Namespace,
- Link: fmt.Sprintf("%v/bug?extid=%v", appURL(c), bugReporting.ID),
- Closed: similarBug.Closed,
+ Title: similarBug.displayTitle(),
+ Status: status,
+ Namespace: similarBug.Namespace,
+ ReproLevel: similarBug.ReproLevel,
+ Link: fmt.Sprintf("%v/bug?extid=%v", appURL(c), bugReporting.ID),
+ ReportLink: bugReporting.Link,
+ Closed: similarBug.Closed,
})
}
// Query crashes.
diff --git a/dashboard/app/reporting_test.go b/dashboard/app/reporting_test.go
index 589df3d45..6d1040472 100644
--- a/dashboard/app/reporting_test.go
+++ b/dashboard/app/reporting_test.go
@@ -988,8 +988,27 @@ func TestFullBugInfo(t *testing.T) {
otherCrash := testCrash(otherBuild, 1)
otherCrash.Title = crashTitle
+ otherCrash.ReproOpts = []byte("repro opts")
+ otherCrash.ReproSyz = []byte("repro syz")
c.client2.ReportCrash(otherCrash)
otherPollMsg := c.client2.pollEmailBug()
+
+ _, err := c.POST("/_ah/mail/", fmt.Sprintf(`Sender: syzkaller@googlegroups.com
+Date: Tue, 15 Aug 2017 14:59:00 -0700
+Message-ID: <1234>
+Subject: crash1
+From: %v
+To: foo@bar.com
+Content-Type: text/plain
+
+This email is only needed to capture the link
+--
+To post to this group, send email to syzkaller@googlegroups.com.
+To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller/1234@google.com.
+For more options, visit https://groups.google.com/d/optout.
+`, otherPollMsg.Sender))
+ c.expectOK(err)
+
_, otherExtBugID, _ := email.RemoveAddrContext(otherPollMsg.Sender)
// Query the full bug info.
@@ -1002,10 +1021,12 @@ func TestFullBugInfo(t *testing.T) {
t.Fatalf("info.BisectCause.BisectCause is empty")
}
c.expectEQ(info.SimilarBugs, []*dashapi.SimilarBugInfo{{
- Title: crashTitle,
- Namespace: "test2",
- Status: dashapi.BugStatusOpen,
- Link: "https://testapp.appspot.com/bug?extid=" + otherExtBugID,
+ Title: crashTitle,
+ Namespace: "test2",
+ Status: dashapi.BugStatusOpen,
+ ReproLevel: dashapi.ReproLevelSyz,
+ Link: "https://testapp.appspot.com/bug?extid=" + otherExtBugID,
+ ReportLink: "https://groups.google.com/d/msgid/syzkaller/1234@google.com",
}})
// There must be 3 crashes.