aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/bisect/bisect.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2024-07-15 17:31:34 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-07-15 15:49:07 +0000
commite8709b21d7c474a0fb6b8ff13039702865fd83bb (patch)
tree482713d13d70ea1ec6670139c6d3fc8eb4a0c795 /pkg/bisect/bisect.go
parentefee4ed2240b89b4959ac8a0490a88f26e7ab506 (diff)
pkg/bisect: set a lower bound for BisectBad verdict
The "1 crashed, 9 OK" cases are a frequent reason of invalid bisection results on syzbot. Let's define a cutoff for a BisectBad verdict and use it to prevent such obvious outliers. We cannot safely declare such results as BisectGood either, so let's return BisectSkip in this case.
Diffstat (limited to 'pkg/bisect/bisect.go')
-rw-r--r--pkg/bisect/bisect.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/bisect/bisect.go b/pkg/bisect/bisect.go
index b75b2d2e0..2654b5dec 100644
--- a/pkg/bisect/bisect.go
+++ b/pkg/bisect/bisect.go
@@ -830,6 +830,7 @@ func (env *env) bisectionDecision(total, bad, good, infra int) (vcs.BisectResult
// Boot errors, image test errors, skipped crashes.
skip := total - bad - good - infra
+ wantBadRuns := max(2, (total-infra)/6) // For 10 runs, require 2 crashes. For 20, require 3.
wantGoodRuns := total / 2
wantTotalRuns := total / 2
if env.flaky {
@@ -840,7 +841,7 @@ func (env *env) bisectionDecision(total, bad, good, infra int) (vcs.BisectResult
// We need a big enough number of good results, otherwise the chance of a false
// positive is too high.
return vcs.BisectGood, nil
- } else if bad > 0 && (good+bad) >= wantTotalRuns {
+ } else if bad >= wantBadRuns && (good+bad) >= wantTotalRuns {
// We need enough (good+bad) results to conclude that the kernel revision itself
// is not too broken.
return vcs.BisectBad, nil