[PATCH] kconfig: Fix repeated include selftest expectation

Zhou Yuhang posted 1 patch 4 days, 17 hours ago
scripts/kconfig/tests/err_repeated_inc/expected_stderr | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] kconfig: Fix repeated include selftest expectation
Posted by Zhou Yuhang 4 days, 17 hours ago
From: Zhou Yuhang <zhouyuhang@kylinos.cn>

The err_repeated_inc test was added with an expected stderr fixture
that does not match the diagnostic printed by kconfig.

Running "make testconfig" currently fails in that test even though the
parser 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.inc3

The fixture expects "Repeated" and "Location" with capital letters, but
the 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>
---
 scripts/kconfig/tests/err_repeated_inc/expected_stderr | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/tests/err_repeated_inc/expected_stderr b/scripts/kconfig/tests/err_repeated_inc/expected_stderr
index 95d90d6a93c5..53071430ea7d 100644
--- a/scripts/kconfig/tests/err_repeated_inc/expected_stderr
+++ b/scripts/kconfig/tests/err_repeated_inc/expected_stderr
@@ -1,2 +1,2 @@
-Kconfig.inc1:4: error: Repeated inclusion of Kconfig.inc3
-Kconfig.inc2:3: note: Location of first inclusion of Kconfig.inc3
+Kconfig.inc1:4: error: repeated inclusion of Kconfig.inc3
+Kconfig.inc2:3: note: location of first inclusion of Kconfig.inc3
-- 
2.43.0
Re: [PATCH] kconfig: Fix repeated include selftest expectation
Posted by Nathan Chancellor 4 days, 1 hour ago
On Wed, May 20, 2026 at 03:08:00PM +0800, Zhou Yuhang wrote:
> From: Zhou Yuhang <zhouyuhang@kylinos.cn>
> 
> The err_repeated_inc test was added with an expected stderr fixture
> that does not match the diagnostic printed by kconfig.
> 
> Running "make testconfig" currently fails in that test even though the
> parser 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.inc3
> 
> The fixture expects "Repeated" and "Location" with capital letters, but
> the 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>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  scripts/kconfig/tests/err_repeated_inc/expected_stderr | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/kconfig/tests/err_repeated_inc/expected_stderr b/scripts/kconfig/tests/err_repeated_inc/expected_stderr
> index 95d90d6a93c5..53071430ea7d 100644
> --- a/scripts/kconfig/tests/err_repeated_inc/expected_stderr
> +++ b/scripts/kconfig/tests/err_repeated_inc/expected_stderr
> @@ -1,2 +1,2 @@
> -Kconfig.inc1:4: error: Repeated inclusion of Kconfig.inc3
> -Kconfig.inc2:3: note: Location of first inclusion of Kconfig.inc3
> +Kconfig.inc1:4: error: repeated inclusion of Kconfig.inc3
> +Kconfig.inc2:3: note: location of first inclusion of Kconfig.inc3
> -- 
> 2.43.0
> 

-- 
Cheers,
Nathan
Re: [PATCH] kconfig: Fix repeated include selftest expectation
Posted by Nicolas Schier 4 days, 10 hours ago
On Wed, 20 May 2026 15:08:00 +0800, Zhou Yuhang wrote:
> The err_repeated_inc test was added with an expected stderr fixture
> that does not match the diagnostic printed by kconfig.
> 
> Running "make testconfig" currently fails in that test even though the
> parser 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.inc3
> 
> [...]

Applied to kbuild/linux.git (kbuild-fixes-unstable), thanks!

[1/1] kconfig: Fix repeated include selftest expectation
      https://git.kernel.org/kbuild/c/e3658d2b

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped,
reverted or modified (e.g. trailers).  Patches applied to the
kbuild-fixes-unstable branch are accepted pending wider testing in
linux-next and any post-commit review; they will generally be moved
to the kbuild-fixes branch in a week if no issues are found.

Best regards,
-- 
Nicolas