diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-11-21 19:02:35 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-11-21 19:02:35 +0100 |
| commit | ad0af9fff5f7ffbd9597e3ffb956fae3f4292b89 (patch) | |
| tree | 79599e37c513c10cfe6c9f630a26e767f29a5e3d /pkg | |
| parent | d4d14b030efd569a3562e5cddd751ab56afda107 (diff) | |
vm: return Report from MonitorExecution
This allows callers to get access to Report.Corrupted.
Better than adding 6-th return value and will allow
to pipe other report properties if necessary.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/repro/repro.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go index 11f0cccaf..dd2bf769d 100644 --- a/pkg/repro/repro.go +++ b/pkg/repro/repro.go @@ -595,15 +595,15 @@ func (ctx *context) testImpl(inst *vm.Instance, command string, duration time.Du if err != nil { return false, fmt.Errorf("failed to run command in VM: %v", err) } - title, report, output, crashed, _ := vm.MonitorExecution(outc, errc, ctx.reporter) - if !crashed { + rep, output := vm.MonitorExecution(outc, errc, ctx.reporter, true) + if rep == nil { ctx.reproLog(2, "program did not crash") return false, nil } - ctx.title = title + ctx.title = rep.Title ctx.log = output - ctx.report = report - ctx.reproLog(2, "program crashed: %v", title) + ctx.report = rep.Report + ctx.reproLog(2, "program crashed: %v", rep.Title) return true, nil } |
