Documentation ¶
Overview ¶
Package instance provides helper functions for creation of temporal instances used for testing of images, patches and bisection.
Index ¶
- Constants
- Variables
- func ExecprogCmd(execprog, executor, OS, arch, vmType string, opts csource.Options, ...) string
- func OverrideVMCount(cfg *mgrconfig.Config, n int) error
- func RunnerCmd(prog, fwdAddr, os, arch string, poolIdx, vmIdx int, threaded, newEnv bool) string
- func SetConfigImage(cfg *mgrconfig.Config, imageDir string, reliable bool) error
- type BuildKernelConfig
- type CrashError
- type Env
- type EnvTestResult
- type ExecParams
- type ExecProgInstance
- func (inst *ExecProgInstance) Close()
- func (inst *ExecProgInstance) RunCProg(params ExecParams) (*RunResult, error)
- func (inst *ExecProgInstance) RunCProgRaw(src []byte, target *prog.Target, duration time.Duration) (*RunResult, error)
- func (inst *ExecProgInstance) RunSyzProg(params ExecParams) (*RunResult, error)
- func (inst *ExecProgInstance) RunSyzProgFile(progFile string, duration time.Duration, opts csource.Options, ...) (*RunResult, error)
- type ExecutorLogger
- type OptionalConfig
- type RunResult
- type Semaphore
- type TestError
Constants ¶
View Source
const ( // It's reasonable to expect that tools/syz-execprog should not normally // return a non-zero exit code. SyzExitConditions = vm.ExitTimeout | vm.ExitNormal )
Variables ¶
Functions ¶
func ExecprogCmd ¶
Types ¶
type BuildKernelConfig ¶
type CrashError ¶
func (*CrashError) Error ¶
func (err *CrashError) Error() string
type Env ¶
type Env interface { BuildSyzkaller(string, string) (string, error) CleanKernel(*BuildKernelConfig) error BuildKernel(*BuildKernelConfig) (string, build.ImageDetails, error) Test(numVMs int, reproSyz, reproOpts, reproC []byte) ([]EnvTestResult, error) }
type EnvTestResult ¶
type ExecParams ¶
type ExecParams struct { // Only one of these will be used, depending on the function. CProg *prog.Prog SyzProg []byte Opts csource.Options Duration time.Duration // If ExitConditions is empty, RunSyzProg() will assume instance.SyzExitConditions. // RunCProg() always runs with binExitConditions. ExitConditions vm.ExitCondition }
type ExecProgInstance ¶
type ExecProgInstance struct { VMInstance *vm.Instance OptionalConfig // contains filtered or unexported fields }
func CreateExecProgInstance ¶
func CreateExecProgInstance(vmPool *vm.Pool, vmIndex int, mgrCfg *mgrconfig.Config, reporter *report.Reporter, opt *OptionalConfig) (*ExecProgInstance, error)
func SetupExecProg ¶
func SetupExecProg(vmInst *vm.Instance, mgrCfg *mgrconfig.Config, reporter *report.Reporter, opt *OptionalConfig) (*ExecProgInstance, error)
func (*ExecProgInstance) Close ¶
func (inst *ExecProgInstance) Close()
func (*ExecProgInstance) RunCProg ¶
func (inst *ExecProgInstance) RunCProg(params ExecParams) (*RunResult, error)
func (*ExecProgInstance) RunCProgRaw ¶
func (*ExecProgInstance) RunSyzProg ¶
func (inst *ExecProgInstance) RunSyzProg(params ExecParams) (*RunResult, error)
func (*ExecProgInstance) RunSyzProgFile ¶
func (inst *ExecProgInstance) RunSyzProgFile(progFile string, duration time.Duration, opts csource.Options, exitCondition vm.ExitCondition) (*RunResult, error)
type ExecutorLogger ¶
type OptionalConfig ¶
type OptionalConfig struct { Logf ExecutorLogger OldFlagsCompatMode bool BeforeContextLen int StraceBin string }
type Semaphore ¶
type Semaphore struct {
// contains filtered or unexported fields
}
func NewSemaphore ¶
Click to show internal directories.
Click to hide internal directories.