kconfig: Fix repeated include selftest expectationThe err_repeated_inc test was added with an expected stderr fixturethat does not match the diagnostic printed by kconfig.Running "make testconfi
kconfig: Fix repeated include selftest expectationThe err_repeated_inc test was added with an expected stderr fixturethat does not match the diagnostic printed by kconfig.Running "make testconfig" currently fails in that test even though theparser reports the duplicated include correctly: [stderr] Kconfig.inc1:4: error: repeated inclusion of Kconfig.inc3 Kconfig.inc2:3: note: location of first inclusion of Kconfig.inc3The fixture expects "Repeated" and "Location" with capital letters, butthe diagnostic emitted by scripts/kconfig/util.c uses lowercase words.Update the fixture to match the real message.Fixes: 102d712ded3e ("kconfig: Error out on duplicated kconfig inclusion")Signed-off-by: Zhou Yuhang <zhouyuhang@kylinos.cn>Tested-by: Nicolas Schier <nsc@kernel.org>Reviewed-by: Nathan Chancellor <nathan@kernel.org>Link: https://patch.msgid.link/20260520070800.2265479-1-zhouyuhang1010@163.comSigned-off-by: Nicolas Schier <nsc@kernel.org>
show more ...
kconfig: Error out on duplicated kconfig inclusionLet kconfig exit with error on duplicated Kconfig file inclusion.Repeated inclusion of Kbuild files are considered bad-practise withregard to ma
kconfig: Error out on duplicated kconfig inclusionLet kconfig exit with error on duplicated Kconfig file inclusion.Repeated inclusion of Kbuild files are considered bad-practise withregard to maintenance; and Kconfig language is rich enough that thereshould be no need for that.If repeated inclusion of Kconfig files is detected, error out withmessages like: Kconfig.inc1:4: error: repeated inclusion of Kconfig.inc3 Kconfig.inc2:3: note: location of first inclusion of Kconfig.inc3While commit f094f8a1b273 ("kconfig: allow multiple inclusion of thesame file") introduced detection of recursive inclusions of Kconfigfiles, it explicitly allowed repeated inclusions, unfortunately w/oreasoning.Reported-by: Linus Torvalds <torvalds@linux-foundation.org>Closes: https://lore.kernel.org/all/CAHk-=wj03hLzK2D=+OYmjgcmGM+XYymp8GyaEs=C0=rXG2nb7w@mail.gmail.com/Reviewed-by: Nathan Chancellor <nathan@kernel.org>Tested-by: Nathan Chancellor <nathan@kernel.org>Link: https://patch.msgid.link/20260220-kconfig-error-out-on-duplicated-inclusion-v1-1-be78aa241a53@kernel.orgSigned-off-by: Nicolas Schier <nsc@kernel.org>