aboutsummaryrefslogtreecommitdiffstats
path: root/vm/gvisor
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2018-11-30 18:12:03 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-11-30 17:12:03 +0000
commit271b354c513a007396686285fa35c96920174d24 (patch)
tree10eac6739201093e389cd325c4572b8a832c5f27 /vm/gvisor
parentbc6b598a2d3a6dd82a5066d1c9ac742787ac667b (diff)
vm/qemu: improve debug output
* vm/qemu: Improve debug output. When running in debug mode, the number of VMs is reduced to 1. State this in the debug output. * vm/qemu: Don't start debug output with a capital letter. As requested by Dimitry. * vm: Provide debug message when reduing number of VMs. Apply this change to all affected platforms for consistency. Suggested by Dmitry. * Add myself to AUTHORS/CONTRIBUTORS files. * vm: Fix compilation issues missed in earlier commit. * vm: Use logging to write debug message.
Diffstat (limited to 'vm/gvisor')
-rw-r--r--vm/gvisor/gvisor.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/vm/gvisor/gvisor.go b/vm/gvisor/gvisor.go
index d339c5c4f..f55c75ba6 100644
--- a/vm/gvisor/gvisor.go
+++ b/vm/gvisor/gvisor.go
@@ -18,6 +18,7 @@ import (
"time"
"github.com/google/syzkaller/pkg/config"
+ "github.com/google/syzkaller/pkg/log"
"github.com/google/syzkaller/pkg/osutil"
"github.com/google/syzkaller/vm/vmimpl"
)
@@ -58,7 +59,8 @@ func ctor(env *vmimpl.Env) (vmimpl.Pool, error) {
if cfg.Count < 1 || cfg.Count > 128 {
return nil, fmt.Errorf("invalid config param count: %v, want [1, 128]", cfg.Count)
}
- if env.Debug {
+ if env.Debug && cfg.Count > 1 {
+ log.Logf(0, "limiting number of VMs from %v to 1 in debug mode", cfg.Count)
cfg.Count = 1
}
if !osutil.IsExist(env.Image) {