From 5153aeaffd096514c1f2652c69cd0fc0d298b1d3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 29 Nov 2017 13:23:42 +0100 Subject: syz-ci: test images before using them Boot and minimally test images before declaring them as good and switching to using them. If image build/boot/test fails, upload report about this to dashboard. --- vm/vmimpl/vmimpl.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vm/vmimpl') diff --git a/vm/vmimpl/vmimpl.go b/vm/vmimpl/vmimpl.go index 617f9bc0f..81f798d26 100644 --- a/vm/vmimpl/vmimpl.go +++ b/vm/vmimpl/vmimpl.go @@ -56,6 +56,16 @@ type Env struct { Config []byte // json-serialized VM-type-specific config } +// BootError is returned by Pool.Create when VM does not boot. +type BootError struct { + Title string + Output []byte +} + +func (err BootError) Error() string { + return fmt.Sprintf("%v\n%s", err.Title, err.Output) +} + // Create creates a VM type that can be used to create individual VMs. func Create(typ string, env *Env) (Pool, error) { ctor := ctors[typ] -- cgit mrf-deployment