mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julian Braha <julianbraha@gmail.com>
To: Nathan Chancellor <nathan@kernel.org>, Nicolas Schier <nsc@kernel.org>
Cc: Pengpeng Hou <pengpeng@iscas.ac.cn>,
	Ulf Magnusson <ulfalizer@gmail.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] kconfig: tests: Reset KCONFIG_WARN_CHANGED_INPUT by default
Date: Fri, 25 Sep 2026 23:19:19 +0100	[thread overview]
Message-ID: <9f0af6b6-bf78-4f4f-96c1-7e08d574b905@gmail.com> (raw)
In-Reply-To: <179036642082.3653489.376583884931759728.b4-reply@b4>

On 9/25/26 21:00, Nathan Chancellor wrote:
> On 2026-09-24 09:35 +0200, Nicolas Schier wrote:
>> On Sat, Sep 19, 2026 at 06:29:39PM +0100, Julian Braha wrote:
>>> On 9/17/26 14:38, Nicolas Schier wrote:
>>>> Reset KCONFIG_WARN_CHANGED_INPUT by default for all kconfig tests but
>>>> those which set it explicitly.
>>>>
>>>> This fixes the 'warn_changed_input' test on systems with
>>>> KCONFIG_WARN_CHANGED_INPUT=1 and ensures a cleaner test environment.
>>>>
>>>> Fixes: 645323a7f4e5 ("kconfig: add optional warnings for changed input values")
>>>> Signed-off-by: Nicolas Schier <n.schier@fritz.com>
>>>> ---
>>>>  scripts/kconfig/tests/conftest.py | 8 ++++++++
>>>>  1 file changed, 8 insertions(+)
>>>>
>>>> diff --git a/scripts/kconfig/tests/conftest.py b/scripts/kconfig/tests/conftest.py
>>>> index 66f95e4ed58c..e92f0cf1421a 100644
>>>> --- a/scripts/kconfig/tests/conftest.py
>>>> +++ b/scripts/kconfig/tests/conftest.py
>>>> @@ -34,6 +34,9 @@ class Conf:
>>>>          """
>>>>          # the directory of the test being run
>>>>          self._test_dir = os.path.dirname(str(request.fspath))
>>>> +        self.default_env = {
>>>> +            "KCONFIG_WARN_CHANGED_INPUT": "",
>>>> +        }
>>>>
>>>>      # runners
>>>>      def _run_conf(self, mode, dot_config=None, out_file='.config',
>>>> @@ -57,6 +60,11 @@ class Conf:
>>>>          # Override 'srctree' environment to make the test as the top directory
>>>>          extra_env['srctree'] = self._test_dir
>>>>
>>>> +        # Set default environment variables, if not set by caller
>>>> +        for var in self.default_env:
>>>> +            if not var in extra_env:
>>>> +                extra_env[var] = self.default_env[var]
>>> Maybe it makes more sense to have the tests ignore users' env vars if
>>> they would cause tests to fail? For example, this recent patch
>>> explicitly unsets the KCONFIG_WERROR flag:
>>> https://lore.kernel.org/linux-kbuild/4d1eee3a-
>>> a5f9-467e-880e-4f2815851b09@gmail.com/T/
>>> #m25be9ad4d5e62956c5f98759398f91a555afb4df
>> Good point, but I am not sure, if we really should ignore all of the
>> user's environment.  Maybe it's better for now, to just reset all
>> environment variables that start with KCONFIG_ and KBUILD_ ?
> Given these are Kconfig tests, we could probaby just ignore KCONFIG_, I
> don't see any instances of KBUILD_ within scripts/kconfig outside of the
> Makefile. We could do both anyways and just adapt based on reports
> though, I don't really have a strong opinion on that though.

Yeah I agree with this, since I would expect only KCONFIG_* to have an
effect on the Kconfig tests.

And after digging into this, it seems KBUILD_EXTRA_WARN does set
KCONFIG_WERROR=1, but as long as we're clearing KCONFIG_WERROR, it won't
matter.

Kconfig also has the 'CONFIG_' flag, which (if set) would break
several tests, but the makefile is already clearing it for the
testconfig target anyway.

- Julian Braha



  reply	other threads:[~2026-09-25 22:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 13:38 [PATCH 0/4] kconfig: tests: Minor fixes and cleanups for warn_changed_input Nicolas Schier
2026-09-17 13:38 ` [PATCH 1/4] kconfig: tests: Reset KCONFIG_WARN_CHANGED_INPUT by default Nicolas Schier
2026-09-19 17:29   ` Julian Braha
2026-09-24  7:35     ` Nicolas Schier
2026-09-25 20:00       ` Nathan Chancellor
2026-09-25 22:19         ` Julian Braha [this message]
2026-09-17 13:38 ` [PATCH 2/4] kconfig: tests: Provide defconfig outfile for savedefconfig Nicolas Schier
2026-09-19 17:45   ` Julian Braha
2026-09-24  8:31     ` Nicolas Schier
2026-09-17 13:38 ` [PATCH 3/4] kconfig: tests: warn_changed_input: Simplify by reusing the extra env Nicolas Schier
2026-09-19 17:57   ` Julian Braha
2026-09-17 13:38 ` [PATCH 4/4] kconfig: tests: {old,save}defconfig: Forward dynamic keyword arguments Nicolas Schier
2026-09-19 18:09   ` Julian Braha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f0af6b6-bf78-4f4f-96c1-7e08d574b905@gmail.com \
    --to=julianbraha@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    --cc=pengpeng@iscas.ac.cn \
    --cc=ulfalizer@gmail.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®