diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-03-07 16:05:31 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-03-08 21:58:12 +0000 |
| commit | 163f510d99dcf7239e56cef53bbca39db1f2fd9b (patch) | |
| tree | 8f246758557af38063013bebd4440ba46e2efe6e /dashboard/app/reporting_test.go | |
| parent | 7e3bd60dd6c8f783f5a418c64aa75f6818236dc4 (diff) | |
dashboard: include revoked reproducers in reports
Context: #5829.
Let's not pretend that the revoked reproducer never existed and still
report it. It will avoid unexpected side-effects for the higher-level
logic.
There may be better ways to resolve the bug, but let's first just get it
fixed to prevent syzbot from spamming the mailing lists.
Add a test to verify the new behavior.
Diffstat (limited to 'dashboard/app/reporting_test.go')
| -rw-r--r-- | dashboard/app/reporting_test.go | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/dashboard/app/reporting_test.go b/dashboard/app/reporting_test.go index aeadf72f1..36ddcc4d1 100644 --- a/dashboard/app/reporting_test.go +++ b/dashboard/app/reporting_test.go @@ -1299,3 +1299,69 @@ func TestWaitForRepro(t *testing.T) { client.ReportCrash(crash) client.pollBug() } + +// The test mimics the failure described in #5829. +func TestReportRevokedBisectCrash(t *testing.T) { + c := NewCtx(t) + defer c.Close() + + client := c.makeClient(clientPublic, keyPublic, true) + build := testBuild(1) + build.KernelRepo = "git://git.com/git.git" + client.UploadBuild(build) + + const crashTitle = "WARNING: abcd" + + crashRepro := testCrashWithRepro(build, 1) + crashRepro.Title = crashTitle + client.ReportCrash(crashRepro) + + // Do a bisection. + pollResp := client.pollJobs(build.Manager) + c.expectNE(pollResp.ID, "") + c.expectEQ(pollResp.Type, dashapi.JobBisectCause) + done := &dashapi.JobDoneReq{ + ID: pollResp.ID, + Build: *testBuild(2), + Log: []byte("bisect log"), + Commits: []dashapi.Commit{ + { + Hash: "111111111111111111111111", + Title: "kernel: break build", + Author: "hacker@kernel.org", + Date: time.Date(2000, 2, 9, 4, 5, 6, 7, time.UTC), + }, + }, + } + client.expectOK(client.JobDone(done)) + report := client.pollBug() + + // Revoke the reproducer. + c.advanceTime(c.config().Obsoleting.ReproRetestStart + time.Hour) + resp := client.pollSpecificJobs(build.Manager, dashapi.ManagerJobs{ + TestPatches: true, + }) + c.expectEQ(resp.Type, dashapi.JobTestPatch) + client.expectOK(client.JobDone(&dashapi.JobDoneReq{ + ID: resp.ID, + })) + + // Move to the next reporting stage. + c.advanceTime(time.Hour) + client.updateBug(report.ID, dashapi.BugStatusUpstream, "") + report = client.pollBug() + client.expectNE(report.ReproCLink, "") + client.expectEQ(report.ReproIsRevoked, true) + + // And now report a new reproducer. + c.advanceTime(time.Hour) + build2 := testBuild(1) + client.UploadBuild(build2) + crashRepro2 := testCrashWithRepro(build2, 2) + crashRepro2.Title = crashTitle + client.ReportCrash(crashRepro2) + + // There should be no new report. + // We already reported that the bug has a reproducer. + client.pollBugs(0) +} |
