From 1466d0cb9f3cfcd088ad7e7e0c8b79b521d129ab Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 17 Feb 2017 18:52:07 +0100 Subject: manager: add ability to communicate with dashboard Manager can send crashes and repros to a dashboard app. Dashboard app is not checked-in yet. --- config/config.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'config') diff --git a/config/config.go b/config/config.go index a0e21dc26..410d9c663 100644 --- a/config/config.go +++ b/config/config.go @@ -39,6 +39,9 @@ type Config struct { Hub_Addr string Hub_Key string + Dashboard_Addr string + Dashboard_Key string + Syzkaller string // path to syzkaller checkout (syz-manager will look for binaries in bin subdir) Type string // VM type (qemu, kvm, local) Count int // number of VMs (don't secify for adb, instead specify devices) @@ -197,6 +200,23 @@ func parse(data []byte) (*Config, map[int]bool, error) { return nil, nil, err } + if cfg.Hub_Addr != "" { + if cfg.Name == "" { + return nil, nil, fmt.Errorf("hub_addr is set, but name is empty") + } + if cfg.Hub_Key == "" { + return nil, nil, fmt.Errorf("hub_addr is set, but hub_key is empty") + } + } + if cfg.Dashboard_Addr != "" { + if cfg.Name == "" { + return nil, nil, fmt.Errorf("dashboard_addr is set, but name is empty") + } + if cfg.Dashboard_Key == "" { + return nil, nil, fmt.Errorf("dashboard_addr is set, but dashboard_key is empty") + } + } + return cfg, syscalls, nil } @@ -332,6 +352,8 @@ func checkUnknownFields(data []byte) (string, error) { "Output", "Hub_Addr", "Hub_Key", + "Dashboard_Addr", + "Dashboard_Key", "Syzkaller", "Type", "Count", -- cgit mrf-deployment