diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2017-07-19 16:57:16 +0200 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@google.com> | 2017-07-24 14:31:25 +0200 |
| commit | 0d9ae38d5d5eb21cadc39a56d1272b40755bb6a3 (patch) | |
| tree | ede8f9a4d14ef7e254cfbd39750e911f5ad4ff88 /pkg | |
| parent | e83310d8a2b1bb6418d041c8e48aad4ae2a8ae81 (diff) | |
pkg/repro: disable Debug flag by default
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/repro/repro.go | 33 |
1 files changed, 9 insertions, 24 deletions
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 - }, }...) |
