Documentation ¶
Overview ¶
Package vm provides an abstract test machine (VM, physical machine, etc) interface for the rest of the system. For convenience test machines are subsequently collectively called VMs. Package wraps vmimpl package interface with some common functionality and higher-level interface.
Index ¶
- Variables
- func AllowsOvercommit(typ string) bool
- type BootErrorer
- type Instance
- func (inst *Instance) Close()
- func (inst *Instance) Copy(hostSrc string) (string, error)
- func (inst *Instance) Diagnose() bool
- func (inst *Instance) Forward(port int) (string, error)
- func (inst *Instance) MonitorExecution(outc <-chan []byte, errc <-chan error, reporter report.Reporter, canExit bool) (rep *report.Report)
- func (inst *Instance) Run(timeout time.Duration, stop <-chan bool, command string) (outc <-chan []byte, errc <-chan error, err error)
- type Pool
Constants ¶
This section is empty.
Variables ¶
var ( Shutdown = vmimpl.Shutdown ErrTimeout = vmimpl.ErrTimeout )
Functions ¶
func AllowsOvercommit ¶
AllowsOvercommit returns if the instance type allows overcommit of instances (i.e. creation of instances out-of-thin-air). Overcommit is used during image and patch testing in syz-ci when it just asks for more than specified in config instances. Generally virtual machines (qemu, gce) support overcommit, while physical machines (adb, isolated) do not. Strictly saying, we should never use overcommit and use only what's specified in config, because we override resource limits specified in config (e.g. can OOM). But it works and makes lots of things much simpler.
Types ¶
type BootErrorer ¶
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
func (*Instance) MonitorExecution ¶
func (inst *Instance) MonitorExecution(outc <-chan []byte, errc <-chan error, reporter report.Reporter, canExit bool) (rep *report.Report)
MonitorExecution monitors execution of a program running inside of a VM. It detects kernel oopses in output, lost connections, hangs, etc. outc/errc is what vm.Instance.Run returns, reporter parses kernel output for oopses. If canExit is false and the program exits, it is treated as an error. Returns a non-symbolized crash report, or nil if no error happens.
Directories ¶
Path | Synopsis |
---|---|
Package gce allows to use Google Compute Engine (GCE) virtual machines as VMs.
|
Package gce allows to use Google Compute Engine (GCE) virtual machines as VMs. |
Package gvisor provides support for gVisor, user-space kernel, testing.
|
Package gvisor provides support for gVisor, user-space kernel, testing. |
Package kvm provides VMs based on lkvm (kvmtool) virtualization.
|
Package kvm provides VMs based on lkvm (kvmtool) virtualization. |
Package vmimpl provides an abstract test machine (VM, physical machine, etc) interface for the rest of the system.
|
Package vmimpl provides an abstract test machine (VM, physical machine, etc) interface for the rest of the system. |
Package vmm provides VMs based on OpenBSD vmm virtualization.
|
Package vmm provides VMs based on OpenBSD vmm virtualization. |