From 8d0aa4f7c0119ce68bcae6f704dc4149ca027179 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 15 Oct 2015 17:58:37 +0200 Subject: improvements for kdbus --- vm/qemu/qemu.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'vm') diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go index fa95fea7e..5d4a4e0f1 100644 --- a/vm/qemu/qemu.go +++ b/vm/qemu/qemu.go @@ -272,6 +272,10 @@ func (inst *Instance) Run() { // Copy the binaries into the instance. if !inst.CreateSCPCommand(inst.Fuzzer, "/syzkaller_fuzzer").Wait(1*time.Minute) || !inst.CreateSCPCommand(inst.Executor, "/syzkaller_executor").Wait(1*time.Minute) { + outputMu.Lock() + output = append(output, "\nfailed to scp binaries into the instance\n"...) + inst.SaveCrasher(output) + outputMu.Unlock() inst.Logf("failed to scp binaries into the instance") return } @@ -324,7 +328,7 @@ func (inst *Instance) Run() { if time.Since(lastOutput) > 3*time.Minute { time.Sleep(time.Second) outputMu.Lock() - output = append(output, "no output from fuzzer, restarting\n"...) + output = append(output, "\nno output from fuzzer, restarting\n"...) inst.SaveCrasher(output) outputMu.Unlock() inst.Logf("no output from fuzzer, restarting") @@ -335,10 +339,10 @@ func (inst *Instance) Run() { if cmd.Exited() { time.Sleep(time.Second) outputMu.Lock() - output = append(output, "fuzzer binary stopped or lost connection\n"...) + output = append(output, "\nfuzzer binary stopped or lost connection\n"...) inst.SaveCrasher(output) - inst.Logf("fuzzer binary stopped or lost connection") outputMu.Unlock() + inst.Logf("fuzzer binary stopped or lost connection") return } if time.Now().After(deadline) { -- cgit mrf-deployment