diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-12-25 19:15:28 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-12-26 10:58:23 +0100 |
| commit | 85d28281fb84c829e7bf77a9e115e985bc8c665c (patch) | |
| tree | 76a52b58695611e34b6d1a093f8bfc27fa0341ee /tools | |
| parent | 4f7962a7bb882af560bc5c66285424f6d3b73e45 (diff) | |
syz-manager: factor out rpc serving part
Update #605
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/syz-mutate/mutate.go | 5 | ||||
| -rw-r--r-- | tools/syz-runtest/runtest.go | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tools/syz-mutate/mutate.go b/tools/syz-mutate/mutate.go index 63bc47ef5..b0361a20b 100644 --- a/tools/syz-mutate/mutate.go +++ b/tools/syz-mutate/mutate.go @@ -36,13 +36,14 @@ func main() { } var syscalls map[*prog.Syscall]bool if *flagEnable != "" { - syscallsIDs, err := mgrconfig.ParseEnabledSyscalls(target, strings.Split(*flagEnable, ","), nil) + enabled := strings.Split(*flagEnable, ",") + syscallsIDs, err := mgrconfig.ParseEnabledSyscalls(target, enabled, nil) if err != nil { fmt.Fprintf(os.Stderr, "failed to parse enabled syscalls: %v", err) os.Exit(1) } syscalls = make(map[*prog.Syscall]bool) - for id := range syscallsIDs { + for _, id := range syscallsIDs { syscalls[target.Syscalls[id]] = true } var disabled map[*prog.Syscall]string diff --git a/tools/syz-runtest/runtest.go b/tools/syz-runtest/runtest.go index b21852299..54be07703 100644 --- a/tools/syz-runtest/runtest.go +++ b/tools/syz-runtest/runtest.go @@ -71,7 +71,7 @@ func main() { reqMap: make(map[int]*runtest.RunRequest), lastReq: make(map[string]int), } - s, err := rpctype.NewRPCServer(cfg.RPC, mgr) + s, err := rpctype.NewRPCServer(cfg.RPC, "Manager", mgr) if err != nil { log.Fatalf("failed to create rpc server: %v", err) } |
