From ee397bf91e9742f2d410282306456afde4efea02 Mon Sep 17 00:00:00 2001 From: Simone Weiß Date: Mon, 4 Mar 2024 20:00:40 +0100 Subject: pkg/bisect: make bisection more robust Bisection should not fail if the Kconfig or the baseline config have issues. Broken kernel sources might lead to issues when parsing Kconfig, ignore this and proceed with the original config. If the baseline config is not parseable, proceed anyway as this is an optional parameter to begin with. --- pkg/bisect/bisect.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/bisect') diff --git a/pkg/bisect/bisect.go b/pkg/bisect/bisect.go index 270668e05..b75b2d2e0 100644 --- a/pkg/bisect/bisect.go +++ b/pkg/bisect/bisect.go @@ -416,7 +416,11 @@ func (env *env) minimizeConfig() (*testResult, error) { minConfig, err := env.minimizer.Minimize(env.cfg.Manager.SysTarget, env.cfg.Kernel.Config, env.cfg.Kernel.BaselineConfig, env.reportTypes, env.cfg.Trace, predMinimize) if err != nil { - return nil, err + if errors.Is(err, vcs.ErrBadKconfig) { + env.log("config minimization failed due to bad Kconfig %v\nproceeding with the original config", err) + } else { + return nil, err + } } env.kernelConfig = minConfig return testResults[hash.Hash(minConfig)], nil -- cgit mrf-deployment