diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-11-11 13:09:51 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-11-11 17:03:41 +0100 |
| commit | 048f2d494ee4a016e2386c28bf8cccdd87896cbd (patch) | |
| tree | 8d323c23678f32dfef756a9198bd218844693106 | |
| parent | 377d77fa575e4e6ebe584082529430cb3fd84917 (diff) | |
dashboard/app: close bugs that we won't fix bisect sooner
Add logic to do the subj.
But it's not enabled yet b/c we need to figure out what to do with KMSAN.
It's different from, say, linux-next.
| -rw-r--r-- | dashboard/app/notifications_test.go | 18 | ||||
| -rw-r--r-- | dashboard/app/reporting.go | 22 |
2 files changed, 39 insertions, 1 deletions
diff --git a/dashboard/app/notifications_test.go b/dashboard/app/notifications_test.go index 3437576f9..dc35ec850 100644 --- a/dashboard/app/notifications_test.go +++ b/dashboard/app/notifications_test.go @@ -283,6 +283,24 @@ func TestEmailNotifNotObsoleted(t *testing.T) { c.expectEQ(notif.Sender, report3.Sender) } +func TestEmailNotifObsoletedManager(t *testing.T) { + // Crashes with repro are auto-obsoleted if happen on a particular manager only. + c := NewCtx(t) + defer c.Close() + + build := testBuild(1) + build.Manager = "no-fix-bisection-manager" + c.client2.UploadBuild(build) + crash := testCrashWithRepro(build, 1) + c.client2.ReportCrash(crash) + report := c.pollEmailBug() + c.incomingEmail(report.Sender, "#syz upstream") + report = c.pollEmailBug() + c.advanceTime(200 * 24 * time.Hour) + notif := c.pollEmailBug() + c.expectTrue(strings.Contains(notif.Body, "Auto-closing this bug as obsolete")) +} + func TestExtNotifUpstreamEmbargo(t *testing.T) { c := NewCtx(t) defer c.Close() diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go index c0a76106e..f19d4d93f 100644 --- a/dashboard/app/reporting.go +++ b/dashboard/app/reporting.go @@ -16,6 +16,7 @@ import ( "github.com/google/syzkaller/pkg/email" "github.com/google/syzkaller/pkg/html" "golang.org/x/net/context" + "google.golang.org/appengine" db "google.golang.org/appengine/datastore" "google.golang.org/appengine/log" ) @@ -205,7 +206,7 @@ func handleReportNotif(c context.Context, typ string, bug *Bug) (*dashapi.BugNot return createNotification(c, dashapi.BugNotifUpstream, true, "", bug, reporting, bugReporting) } if len(bug.Commits) == 0 && - bug.ReproLevel == ReproLevelNone && + bug.wontBeFixBisected() && timeSince(c, bug.LastActivity) > notifyResendPeriod && timeSince(c, bug.LastTime) > bug.obsoletePeriod() { log.Infof(c, "%v: obsoleting: %v", bug.Namespace, bug.Title) @@ -222,6 +223,25 @@ func handleReportNotif(c context.Context, typ string, bug *Bug) (*dashapi.BugNot return nil, nil } +func (bug *Bug) wontBeFixBisected() bool { + if bug.ReproLevel == ReproLevelNone { + return true + } + // TODO: this is what we would like to do, but we need to figure out + // KMSAN story: we don't do fix bisection on it (rebased), + // do we want to close all old KMSAN bugs with repros? + if appengine.IsDevAppServer() { + cfg := config.Namespaces[bug.Namespace] + for _, mgr := range bug.HappenedOn { + if !cfg.Managers[mgr].FixBisectionDisabled { + return false + } + } + return true + } + return false +} + func (bug *Bug) obsoletePeriod() time.Duration { period := never if config.Obsoleting.MinPeriod == 0 { |
