aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/instance/instance.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-07-25 16:45:57 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-08-03 21:08:02 +0200
commit2763e04c22143367e0b613ac612c537b6d94d2c9 (patch)
treef311d8215aa6e148c0db2e7bfface5d10b0654af /pkg/instance/instance.go
parent78e3ad98f6120342ae56b9812c695637fc245c75 (diff)
tools/syz-runtest: add tool for program unit testing
The tool is run as: $ syz-runtest -config manager.config This runs all programs from sys/*/test/* in different modes on actual VMs and checks results. Fixes #603
Diffstat (limited to 'pkg/instance/instance.go')
-rw-r--r--pkg/instance/instance.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go
index 102d90ca5..ebcf75c40 100644
--- a/pkg/instance/instance.go
+++ b/pkg/instance/instance.go
@@ -267,7 +267,7 @@ func (inst *inst) testInstance() error {
}
cmd := FuzzerCmd(fuzzerBin, executorBin, "test", inst.cfg.TargetOS, inst.cfg.TargetArch, fwdAddr,
- inst.cfg.Sandbox, 0, 0, false, false, true)
+ inst.cfg.Sandbox, 0, 0, false, false, true, false)
outc, errc, err := inst.vm.Run(5*time.Minute, nil, cmd)
if err != nil {
return fmt.Errorf("failed to run binary in VM: %v", err)
@@ -364,7 +364,7 @@ func (inst *inst) testProgram(command string, testTime time.Duration) error {
}
func FuzzerCmd(fuzzer, executor, name, OS, arch, fwdAddr, sandbox string, procs, verbosity int,
- cover, debug, test bool) string {
+ cover, debug, test, runtest bool) string {
osArg := ""
if OS == "akaros" {
// Only akaros needs OS, because the rest assume host OS.
@@ -373,9 +373,9 @@ func FuzzerCmd(fuzzer, executor, name, OS, arch, fwdAddr, sandbox string, procs,
osArg = " -os=" + OS
}
return fmt.Sprintf("%v -executor=%v -name=%v -arch=%v%v -manager=%v -sandbox=%v"+
- " -procs=%v -v=%d -cover=%v -debug=%v -test=%v",
+ " -procs=%v -v=%d -cover=%v -debug=%v -test=%v -runtest=%v",
fuzzer, executor, name, arch, osArg, fwdAddr, sandbox,
- procs, verbosity, cover, debug, test)
+ procs, verbosity, cover, debug, test, runtest)
}
func ExecprogCmd(execprog, executor, OS, arch, sandbox string, repeat, threaded, collide bool,