aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/bisect
diff options
context:
space:
mode:
authorSpace Meyer <spm@google.com>2022-09-13 15:24:23 +0000
committerSpace Meyer <git@the-space.agency>2022-10-07 11:11:53 +0200
commit79a5963585ac032cd3f390a37b5d276f7f9d0b5c (patch)
tree593a2ad8c17be76a25b04654429f1604a565a0a2 /pkg/bisect
parent8a2121976b8020f2006c1a953766af912ba709dd (diff)
pkg/bisect: use default compiler during bisection where possible
This allows us to bisect at least recently introduced bugs, where the manager that found the bug uses a non standard compiler. This is usefull during development of a new sanitizer for which a compiler with non-upstreamed patches is required.
Diffstat (limited to 'pkg/bisect')
-rw-r--r--pkg/bisect/bisect.go28
1 files changed, 15 insertions, 13 deletions
diff --git a/pkg/bisect/bisect.go b/pkg/bisect/bisect.go
index 939101a6e..5755bf562 100644
--- a/pkg/bisect/bisect.go
+++ b/pkg/bisect/bisect.go
@@ -19,16 +19,17 @@ import (
)
type Config struct {
- Trace debugtracer.DebugTracer
- Fix bool
- BisectCompiler string
- BinDir string
- Ccache string
- Timeout time.Duration
- Kernel KernelConfig
- Syzkaller SyzkallerConfig
- Repro ReproConfig
- Manager *mgrconfig.Config
+ Trace debugtracer.DebugTracer
+ Fix bool
+ DefaultCompiler string
+ CompilerType string
+ BinDir string
+ Ccache string
+ Timeout time.Duration
+ Kernel KernelConfig
+ Syzkaller SyzkallerConfig
+ Repro ReproConfig
+ Manager *mgrconfig.Config
}
type KernelConfig struct {
@@ -420,7 +421,7 @@ func (env *env) commitRangeForFix() (*vcs.Commit, *vcs.Commit, *report.Report, [
func (env *env) commitRangeForBug() (*vcs.Commit, *vcs.Commit, *report.Report, []*testResult, error) {
cfg := env.cfg
- tags, err := env.bisecter.PreviousReleaseTags(cfg.Kernel.Commit, cfg.BisectCompiler)
+ tags, err := env.bisecter.PreviousReleaseTags(cfg.Kernel.Commit, cfg.CompilerType)
if err != nil {
return nil, nil, nil, nil, err
}
@@ -465,11 +466,12 @@ func (env *env) build() (*vcs.Commit, string, error) {
return nil, "", err
}
- bisectEnv, err := env.bisecter.EnvForCommit(env.cfg.BisectCompiler, env.cfg.BinDir, current.Hash, env.kernelConfig)
+ bisectEnv, err := env.bisecter.EnvForCommit(
+ env.cfg.DefaultCompiler, env.cfg.CompilerType, env.cfg.BinDir, current.Hash, env.kernelConfig)
if err != nil {
return current, "", err
}
- env.log("testing commit %v %v", current.Hash, env.cfg.BisectCompiler)
+ env.log("testing commit %v %v", current.Hash, env.cfg.CompilerType)
buildStart := time.Now()
mgr := env.cfg.Manager
if err := build.Clean(mgr.TargetOS, mgr.TargetVMArch, mgr.Type, mgr.KernelSrc); err != nil {