diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-05-06 11:18:37 -0700 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-05-06 11:18:37 -0700 |
| commit | 9f73d05d6fc37bff3e1c03d8e6a12a7a2f9d8f94 (patch) | |
| tree | 282343a43d2edfd3538325db356fd1e5ac4c5340 | |
| parent | 9d41442c5defe7072ced0a733c95df4fe766acb8 (diff) | |
syz-gce: allow to disable dashboard patches
Older kernels will most likely break if we apply some
upstream patches to them (most patches won't apply,
but some still do). Allow to disable usage of dashboard
patches in config for such kernels.
| -rw-r--r-- | syz-gce/syz-gce.go | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/syz-gce/syz-gce.go b/syz-gce/syz-gce.go index f52f6ac90..6787709e5 100644 --- a/syz-gce/syz-gce.go +++ b/syz-gce/syz-gce.go @@ -58,25 +58,26 @@ var ( ) type Config struct { - Name string - Hub_Addr string - Hub_Key string - Image_Archive string - Image_Path string - Image_Name string - Http_Port int - Machine_Type string - Machine_Count int - Sandbox string - Procs int - Linux_Git string - Linux_Branch string - Linux_Compiler string - Linux_Userspace string - Enable_Syscalls []string - Disable_Syscalls []string - Dashboard_Addr string - Dashboard_Key string + Name string + Hub_Addr string + Hub_Key string + Image_Archive string + Image_Path string + Image_Name string + Http_Port int + Machine_Type string + Machine_Count int + Sandbox string + Procs int + Linux_Git string + Linux_Branch string + Linux_Compiler string + Linux_Userspace string + Enable_Syscalls []string + Disable_Syscalls []string + Dashboard_Addr string + Dashboard_Key string + Use_Dashboard_Patches bool } type Action interface { @@ -119,7 +120,7 @@ func main() { if syscall.Getuid() != 0 { Fatalf("building local image requires root") } - if cfg.Dashboard_Addr != "" { + if cfg.Use_Dashboard_Patches && cfg.Dashboard_Addr != "" { actions = append(actions, &DashboardAction{ Dash: &dashboard.Dashboard{ Addr: cfg.Dashboard_Addr, @@ -500,6 +501,7 @@ func readConfig(filename string) *Config { Fatalf("failed to read config file: %v", err) } cfg := new(Config) + cfg.Use_Dashboard_Patches = true if err := json.Unmarshal(data, cfg); err != nil { Fatalf("failed to parse config file: %v", err) } |
