From 87bfb99cfe1eef9469625911574b1caab04557d3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 20 Jun 2018 15:26:37 +0200 Subject: vm: pass instance to MonitorExecution It may need it later to try to obtain additional diagnostic from hanged instances. --- pkg/instance/instance.go | 4 ++-- pkg/repro/repro.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg') diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index 9a1b95dae..2410713ae 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -240,7 +240,7 @@ func (inst *inst) testInstance() error { if err != nil { return fmt.Errorf("failed to run binary in VM: %v", err) } - rep := vm.MonitorExecution(outc, errc, inst.reporter, true) + rep := inst.vm.MonitorExecution(outc, errc, inst.reporter, true) if rep != nil { if err := inst.reporter.Symbolize(rep); err != nil { // TODO(dvyukov): send such errors to dashboard. @@ -323,7 +323,7 @@ func (inst *inst) testProgram(command string, testTime time.Duration) error { if err != nil { return fmt.Errorf("failed to run binary in VM: %v", err) } - rep := vm.MonitorExecution(outc, errc, inst.reporter, true) + rep := inst.vm.MonitorExecution(outc, errc, inst.reporter, true) if rep == nil { return nil } diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go index c6106b4bd..2501d1672 100644 --- a/pkg/repro/repro.go +++ b/pkg/repro/repro.go @@ -610,7 +610,7 @@ 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) } - rep := vm.MonitorExecution(outc, errc, ctx.reporter, true) + rep := inst.MonitorExecution(outc, errc, ctx.reporter, true) if rep == nil { ctx.reproLog(2, "program did not crash") return false, nil -- cgit mrf-deployment