aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dashboard/app/tree.go4
-rw-r--r--dashboard/app/tree_test.go38
2 files changed, 42 insertions, 0 deletions
diff --git a/dashboard/app/tree.go b/dashboard/app/tree.go
index d6a2dcce5..07acde1fa 100644
--- a/dashboard/app/tree.go
+++ b/dashboard/app/tree.go
@@ -759,6 +759,10 @@ func crossTreeBisection(c context.Context, bug *Bug,
return nil
}
_, successJob := bug.findResult(c, from.repo, wantNewAny{}, runOnHEAD{})
+ if successJob == nil {
+ // The jobs is not done yet.
+ return nil
+ }
if successJob.CrashTitle != "" {
// The kernel tree is still crashed by the repro.
return nil
diff --git a/dashboard/app/tree_test.go b/dashboard/app/tree_test.go
index 67390737b..f9109202f 100644
--- a/dashboard/app/tree_test.go
+++ b/dashboard/app/tree_test.go
@@ -363,6 +363,38 @@ For information about bisection process see: %URL%#bisection
assert.NotContains(t, string(reply), treeTestCrashTitle)
}
+func TestNonfinalFixCandidateBisect(t *testing.T) {
+ c := NewCtx(t)
+ defer c.Close()
+
+ ctx := setUpTreeTest(c, downstreamUpstreamRepos)
+ ctx.uploadBug(`https://downstream.repo/repo`, `master`, dashapi.ReproLevelC)
+ ctx.entries = []treeTestEntry{
+ {
+ alias: `downstream`,
+ results: []treeTestEntryPeriod{{fromDay: 0, result: treeTestCrash}},
+ },
+ {
+ alias: `lts`,
+ mergeAlias: `downstream`,
+ results: []treeTestEntryPeriod{{fromDay: 0, result: treeTestCrash}},
+ },
+ {
+ alias: `upstream`,
+ // Ignore these jobs.
+ results: []treeTestEntryPeriod{},
+ },
+ }
+ ctx.jobTestDays = []int{10}
+ ctx.moveToDay(10)
+ ctx.reportToEmail()
+ ctx.ctx.advanceTime(time.Hour)
+
+ // Ensure the code does not fail.
+ job := ctx.client.pollSpecificJobs(ctx.manager, dashapi.ManagerJobs{BisectFix: true})
+ assert.Equal(t, "", job.ID)
+}
+
func TestTreeBisectionBeforeOrigin(t *testing.T) {
c := NewCtx(t)
defer c.Close()
@@ -1047,12 +1079,18 @@ func (ctx *treeTestCtx) doJob(resp *dashapi.JobPollResp, day int) {
// Figure out what should the result be.
result := treeTestOK
build := testBuild(1)
+ var anyFound bool
for _, item := range found.results {
if day >= item.fromDay {
result = item.result
build.KernelCommit = item.commit
+ anyFound = true
}
}
+ if !anyFound {
+ // Just ignore the job.
+ return
+ }
if build.KernelCommit == "" {
build.KernelCommit = strings.Repeat("f", 40)[:40]
}