From a54c2b7b920e69215f16cd02bb95957902ab1541 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 11 Sep 2018 15:33:45 +0200 Subject: syz-ci: de-hardcode list of VMs that support overcommit We currently have this list in multiple places (somewhat diverged). Specify this "overcommit" property in VM implementations. In particular, we also want to allow overcommit for "vmm" type. Update #712 --- pkg/instance/instance.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'pkg/instance/instance.go') diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index ad0a1ba76..c7c457ea6 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -31,10 +31,8 @@ type Env struct { } func NewEnv(cfg *mgrconfig.Config) (*Env, error) { - switch cfg.Type { - case "gce", "qemu", "gvisor": - default: - return nil, fmt.Errorf("test instances can only work with qemu/gce") + if !vm.AllowsOvercommit(cfg.Type) { + return nil, fmt.Errorf("test instances are not supported for %v VMs", cfg.Type) } if cfg.Workdir == "" { return nil, fmt.Errorf("workdir path is empty") -- cgit mrf-deployment