From ad0af9fff5f7ffbd9597e3ffb956fae3f4292b89 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 21 Nov 2017 19:02:35 +0100 Subject: 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. --- pkg/repro/repro.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkg') 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 } -- cgit mrf-deployment