From 0d9ae38d5d5eb21cadc39a56d1272b40755bb6a3 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Wed, 19 Jul 2017 16:57:16 +0200 Subject: pkg/repro: disable Debug flag by default --- pkg/repro/repro.go | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'pkg') diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go index 2fbd42e14..3bab0d603 100644 --- a/pkg/repro/repro.go +++ b/pkg/repro/repro.go @@ -266,9 +266,7 @@ func (ctx *context) extractProg(entries []*prog.LogEntry) (*Result, error) { return nil, nil } -func (ctx *context) extractProgSingle(entries []*prog.LogEntry, duration time.Duration) (*Result, error) { - ctx.reproLog(3, "single: executing %d programs separately with timeout %s", len(entries), duration) - +func (ctx *context) createDefaultOps() csource.Options { opts := csource.Options{ Threaded: true, Collide: true, @@ -279,9 +277,15 @@ func (ctx *context) extractProgSingle(entries []*prog.LogEntry, duration time.Du UseTmpDir: true, HandleSegv: true, WaitRepeat: true, - Debug: true, Repro: true, } + return opts +} + +func (ctx *context) extractProgSingle(entries []*prog.LogEntry, duration time.Duration) (*Result, error) { + ctx.reproLog(3, "single: executing %d programs separately with timeout %s", len(entries), duration) + + opts := ctx.createDefaultOps() for _, ent := range entries { opts.Fault = ent.Fault @@ -312,19 +316,7 @@ func (ctx *context) extractProgSingle(entries []*prog.LogEntry, duration time.Du func (ctx *context) extractProgBisect(entries []*prog.LogEntry, baseDuration time.Duration) (*Result, error) { ctx.reproLog(3, "bisect: bisecting %d programs with base timeout %s", len(entries), baseDuration) - opts := csource.Options{ - Threaded: true, - Collide: true, - Repeat: true, - Procs: ctx.cfg.Procs, - Sandbox: ctx.cfg.Sandbox, - EnableTun: true, - UseTmpDir: true, - HandleSegv: true, - WaitRepeat: true, - Debug: true, - Repro: true, - } + opts := ctx.createDefaultOps() duration := func(entries int) time.Duration { return baseDuration + time.Duration((entries/4))*time.Second @@ -817,11 +809,4 @@ var cSimplifies = append(progSimplifies, []Simplify{ opts.WaitRepeat = false return true }, - func(opts *csource.Options) bool { - if !opts.Debug { - return false - } - opts.Debug = false - return true - }, }...) -- cgit mrf-deployment