From 62ee098758aa41a10767827625d32a871279eec9 Mon Sep 17 00:00:00 2001 From: tarasmadan <89859571+tarasmadan@users.noreply.github.com> Date: Wed, 6 Oct 2021 20:15:54 +0200 Subject: syz-verifier: fixes the crash of the app run w/o parameters (#2800) * syz-verifier: fixes the crash of the app run w/o parameters * syz-verifier: extend command line params description --- syz-verifier/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'syz-verifier') diff --git a/syz-verifier/main.go b/syz-verifier/main.go index 0a047231d..c429fc5a3 100755 --- a/syz-verifier/main.go +++ b/syz-verifier/main.go @@ -113,7 +113,7 @@ type runnerProgs map[int]*progInfo func main() { var cfgs tool.CfgsFlag - flag.Var(&cfgs, "configs", "list of kernel-specific comma-sepatated configuration files ") + flag.Var(&cfgs, "configs", "[MANDATORY] list of at least two kernel-specific comma-sepatated configuration files") flagDebug := flag.Bool("debug", false, "dump all VM output to console") flagStats := flag.String("stats", "", "where stats will be written when"+ "execution of syz-verifier finishes, defaults to stdout") @@ -136,6 +136,11 @@ func main() { pools[idx] = pi } + if len(pools) < 2 { + flag.Usage() + os.Exit(1) + } + cfg := pools[0].cfg workdir, target, sysTarget, addr := cfg.Workdir, cfg.Target, cfg.SysTarget, cfg.RPC for idx := 1; idx < len(pools); idx++ { -- cgit mrf-deployment