aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/instance
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-09-11 15:33:45 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-09-11 15:33:45 +0200
commita54c2b7b920e69215f16cd02bb95957902ab1541 (patch)
tree639d5554879f3e475fc806cffa5608f9cfa630fd /pkg/instance
parent472947468d9571f86c2fde301a04478f22b3544b (diff)
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
Diffstat (limited to 'pkg/instance')
-rw-r--r--pkg/instance/instance.go6
1 files changed, 2 insertions, 4 deletions
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")