mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-19 11:00:37 +00:00
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.
This commit is contained in:
parent
bc6b598a2d
commit
271b354c51
1
AUTHORS
1
AUTHORS
@ -27,3 +27,4 @@ Chi Pham
|
||||
Anton Lindqvist
|
||||
Greg Steuck
|
||||
Shankara Pailoor
|
||||
Michael Tuexen
|
||||
|
@ -38,3 +38,4 @@ Joey Jiao
|
||||
Anton Lindqvist
|
||||
Tobin Harding
|
||||
Shankara Pailoor
|
||||
Michael Tuexen
|
||||
|
@ -74,7 +74,8 @@ func ctor(env *vmimpl.Env) (vmimpl.Pool, error) {
|
||||
if cfg.Count < 1 || cfg.Count > 1000 {
|
||||
return nil, fmt.Errorf("invalid config param count: %v, want [1, 1000]", 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 cfg.MachineType == "" {
|
||||
|
@ -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) {
|
||||
|
@ -62,7 +62,8 @@ func ctor(env *vmimpl.Env) (vmimpl.Pool, error) {
|
||||
return nil, fmt.Errorf("bad target %q: %v", target, err)
|
||||
}
|
||||
}
|
||||
if env.Debug {
|
||||
if env.Debug && len(cfg.Targets) > 1 {
|
||||
log.Logf(0, "limiting number of targets from %v to 1 in debug mode", len(cfg.Targets))
|
||||
cfg.Targets = cfg.Targets[:1]
|
||||
}
|
||||
pool := &Pool{
|
||||
|
@ -16,6 +16,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"
|
||||
)
|
||||
@ -67,7 +68,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 env.Image != "" {
|
||||
|
@ -180,7 +180,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 _, err := exec.LookPath(cfg.Qemu); err != nil {
|
||||
|
@ -69,7 +69,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 cfg.Mem < 128 || cfg.Mem > 1048576 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user