From: Nicolas Schier <nsc@kernel.org>
To: Julian Braha <julianbraha@gmail.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
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: Thu, 24 Sep 2026 09:35:25 +0200 [thread overview]
Message-ID: <arTSvcwLenaZwKm7@levanger> (raw)
In-Reply-To: <a1efc002-c34b-43a4-be02-ff4746d13241@gmail.com>
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_ ?
--
Nicolas
next prev parent reply other threads:[~2026-09-24 7:35 UTC|newest]
Thread overview: 11+ 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 [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=arTSvcwLenaZwKm7@levanger \
--to=nsc@kernel.org \
--cc=julianbraha@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@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®