From 2763e04c22143367e0b613ac612c537b6d94d2c9 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 25 Jul 2018 16:45:57 +0200 Subject: 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 --- pkg/instance/instance.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pkg/instance/instance.go') 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, -- cgit mrf-deployment