diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-06-29 10:47:42 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-06-29 10:47:42 +0200 |
| commit | 7b45fa115b57d0a6424c369483b320acfe6a1de7 (patch) | |
| tree | fbc8b30b977926c3345509358bfdc76eaa2ca495 /pkg/repro | |
| parent | 1a3c2436df1f7c9c0271aad092558d943a0ee19e (diff) | |
pkg/csource: support fuchsia
Lots of assorted heavylifting to support csource on fuchsia.
Diffstat (limited to 'pkg/repro')
| -rw-r--r-- | pkg/repro/repro.go | 25 | ||||
| -rw-r--r-- | pkg/repro/repro_test.go | 2 |
2 files changed, 3 insertions, 24 deletions
diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go index 2501d1672..5df344a69 100644 --- a/pkg/repro/repro.go +++ b/pkg/repro/repro.go @@ -289,30 +289,10 @@ func (ctx *context) extractProg(entries []*prog.LogEntry) (*Result, error) { return nil, nil } -func (ctx *context) createDefaultOps() csource.Options { - opts := csource.Options{ - Threaded: true, - Collide: true, - Repeat: true, - Procs: ctx.cfg.Procs, - Sandbox: ctx.cfg.Sandbox, - EnableTun: true, - EnableCgroups: true, - EnableNetdev: true, - ResetNet: true, - UseTmpDir: true, - HandleSegv: true, - WaitRepeat: 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() - + opts := csource.DefaultOpts(ctx.cfg) for _, ent := range entries { opts.Fault = ent.Fault opts.FaultCall = ent.FaultCall @@ -342,8 +322,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 := ctx.createDefaultOps() - + opts := csource.DefaultOpts(ctx.cfg) duration := func(entries int) time.Duration { return baseDuration + time.Duration((entries/4))*time.Second } diff --git a/pkg/repro/repro_test.go b/pkg/repro/repro_test.go index 0a437e713..91d71e84d 100644 --- a/pkg/repro/repro_test.go +++ b/pkg/repro/repro_test.go @@ -83,7 +83,7 @@ func TestSimplifies(t *testing.T) { } var check func(opts csource.Options, i int) check = func(opts csource.Options, i int) { - if err := opts.Check(); err != nil { + if err := opts.Check("linux"); err != nil { t.Fatalf("opts are invalid: %v", err) } if i == len(cSimplifies) { |
