From e8709b21d7c474a0fb6b8ff13039702865fd83bb Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Mon, 15 Jul 2024 17:31:34 +0200 Subject: 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. --- pkg/bisect/bisect.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/bisect/bisect.go') 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 -- cgit mrf-deployment