diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-05-10 11:06:17 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-05-10 11:06:17 +0200 |
| commit | 8f24b7d63ed022019c9c221a7e9b54ec1c11f533 (patch) | |
| tree | 0176351a3a0883f2369c779864a6067f35023f1d /pkg/bisect | |
| parent | 4e7ecf0713aa5b07b0e2b9fffb6d6e51f759900d (diff) | |
syz-ci: always use 10 VMs for bisection
If a manager has less then 10 VMs override it to 10 for bisection.
If a manager has only 1 VM, bisection won't end well.
Diffstat (limited to 'pkg/bisect')
| -rw-r--r-- | pkg/bisect/bisect.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/bisect/bisect.go b/pkg/bisect/bisect.go index dea41581f..d3ff05da4 100644 --- a/pkg/bisect/bisect.go +++ b/pkg/bisect/bisect.go @@ -61,6 +61,8 @@ type env struct { testTime time.Duration } +const NumTests = 10 // number of tests we do per commit + // Run does the bisection and returns: // - if bisection is conclusive, the single cause/fix commit // - for cause bisection report is the crash on the cause commit @@ -275,8 +277,7 @@ func (env *env) test() (vcs.BisectResult, *vcs.Commit, *report.Report, error) { return vcs.BisectSkip, current, nil, nil } testStart := time.Now() - const numTests = 10 - results, err := env.inst.Test(numTests, cfg.Repro.Syz, cfg.Repro.Opts, cfg.Repro.C) + results, err := env.inst.Test(NumTests, cfg.Repro.Syz, cfg.Repro.Opts, cfg.Repro.C) env.testTime += time.Since(testStart) if err != nil { env.log("failed: %v", err) @@ -286,7 +287,7 @@ func (env *env) test() (vcs.BisectResult, *vcs.Commit, *report.Report, error) { res := vcs.BisectSkip if bad != 0 { res = vcs.BisectBad - } else if numTests-good-bad > numTests/3*2 { + } else if NumTests-good-bad > NumTests/3*2 { // More than 2/3 of instances failed with infrastructure error, // can't reliably tell that the commit is good. res = vcs.BisectSkip |
