diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-06-12 14:22:58 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-06-13 13:13:03 +0000 |
| commit | 0e8da31f2d4312fc3ad5c1e2e221075831885e0e (patch) | |
| tree | 11aa8601d60ba4a34781f9e42df62956c012b3b6 /tools/syz-kconf | |
| parent | 1f72c409b75ea2adfb5410615b8fffd7f91b2690 (diff) | |
tools/syz-kconfig: suggest reasons for wrongly selected configs
The most frustrating part of updating syzbot configs is figuring out
what config options (possibly transivitely) selected the configs we
wanted to stay disabled.
For each "X is present in the final config" message, auto-generate
a small list of enabled config options that may have transitively
"select"ed X.
Diffstat (limited to 'tools/syz-kconf')
| -rw-r--r-- | tools/syz-kconf/kconf.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/syz-kconf/kconf.go b/tools/syz-kconf/kconf.go index 5a8808a11..ac9392e8e 100644 --- a/tools/syz-kconf/kconf.go +++ b/tools/syz-kconf/kconf.go @@ -315,7 +315,17 @@ func (ctx *Context) verifyConfigs(cf *kconfig.ConfigFile) error { if act == kconfig.No { errs.push("%v:%v: %v is not present in the final config", cfg.File, cfg.Line, cfg.Name) } else if cfg.Value == kconfig.No { - errs.push("%v:%v: %v is present in the final config", cfg.File, cfg.Line, cfg.Name) + var selectedBy []string + for name := range ctx.Kconf.SelectedBy(cfg.Name) { + if cf.Value(name) == kconfig.Yes { + selectedBy = append(selectedBy, name) + } + } + selectedByStr := "" + if len(selectedBy) > 0 { + selectedByStr = fmt.Sprintf(", possibly selected by %q", selectedBy) + } + errs.push("%v:%v: %v is present in the final config%s", cfg.File, cfg.Line, cfg.Name, selectedByStr) } else { errs.push("%v:%v: %v does not match final config %v vs %v", cfg.File, cfg.Line, cfg.Name, cfg.Value, act) |
