diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-01-12 11:43:20 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-01-12 12:33:22 +0000 |
| commit | c9aa7b7def60823283a7fd261940c0a05d3ce850 (patch) | |
| tree | ba1a33ed1de2fd22b3805539f26df366d175f73c /syz-ci | |
| parent | 6b2f65379d4de4dff02fcf11008f582d27fdcf59 (diff) | |
syz-ci: support global per-vm-type configs
This will help prevent many repetitions in our syz-ci configs.
Diffstat (limited to 'syz-ci')
| -rw-r--r-- | syz-ci/syz-ci.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/syz-ci/syz-ci.go b/syz-ci/syz-ci.go index e1408c64e..6eb62bba4 100644 --- a/syz-ci/syz-ci.go +++ b/syz-ci/syz-ci.go @@ -133,6 +133,9 @@ type Config struct { CommitPollPeriod int `json:"commit_poll_period"` // Asset Storage config. AssetStorage *asset.Config `json:"asset_storage"` + // Per-vm type JSON diffs that will be applied to every instace of the + // corresponding VM type. + PatchVMConfigs map[string]json.RawMessage `json:"patch_vm_configs"` } type ManagerConfig struct { @@ -457,6 +460,13 @@ func loadManagerConfig(cfg *Config, mgr *ManagerConfig) error { if mgr.KernelConfig != "" && mgr.KernelBaselineConfig == "" { mgr.KernelBaselineConfig = inferBaselineConfig(mgr.KernelConfig) } + + if cfg.PatchVMConfigs[managercfg.Type] != nil { + managercfg.VM, err = config.MergeJSONs(managercfg.VM, cfg.PatchVMConfigs[managercfg.Type]) + if err != nil { + return fmt.Errorf("failed to patch manager %v's VM: %w", mgr.Name, err) + } + } return nil } |
