Article View: linux.kernel
Article #22Re: [PATCH v1 03/10] kconfig-checker: Add the configuration checker code
From: Ahmed S. Darwish
Date: Mon, 09 Nov 2026 13:20
Date: Mon, 09 Nov 2026 13:20
44 lines
3756 bytes
3756 bytes
On Sun, 08 Nov 2026, Julian Braha wrote: > > On 11/6/26 09:19, Ahmed S. Darwish wrote: > > + > > +class KernelConfig: > > + """.config file parser""" ... > > + > > + def _parse_symbols(self) -> dict[str, str]: > > + """Extract CONFIG_* symbol assignments from .config""" > > + symbol_set = re.compile(r'^(CONFIG_[A-Za-z0-9_]+)=([ym])$') > > + symbol_unset = re.compile(r'^# (CONFIG_[A-Za-z0-9_]+) is not set$') > > What does this do for Kconfig's int, hex, and string options? > So far, the tool only supports stating whether an option is enabled, disabled, or have a neutral 'allowed' policy. But there's nothing stopping us from supporting something like: - name: CONFIG_PANIC_TIMEOUT expected: int expected_value: 10 - name: CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE expected: hex expected_value: 0x1 - name: CONFIG_NLS_DEFAULT expected: string expected_value: "utf-8" In v2 of this series, I'll make the schema explicitly versioned. This way, new features like the above can be cleanly added. P.S., I can definitely implement such support, but I'm a bit hesitant to adding features that are not yet needed by the existing mainline policies. Thanks! -- Ahmed S. Darwish Linutronix GmbH
Technical Details
Message-ID:
<NXxrY-aOTL-7@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomodReferences:
<NWoK5-aaez-7@gated-at.bofh.it> <NWLdD-amPt-5@gated-at.bofh.it> <NXxrY-aOTL-9@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: "Ahmed S. Darwish" <darwi@linutronix.de> Newsgroups: linux.debian.kernel,linux.kernel Subject: Re: [PATCH v1 03/10] kconfig-checker: Add the configuration checker code Date: Mon, 09 Nov 2026 14:20:02 +0100 Message-ID: <NXxrY-aOTL-7@gated-at.bofh.it> References: <NWoK5-aaez-7@gated-at.bofh.it> <NWLdD-amPt-5@gated-at.bofh.it> <NXxrY-aOTL-9@gated-at.bofh.it> X-Mailbox-Line: From debian-kernel-request@lists.debian.org Mon Nov 9 13:18:09 2026 Old-Return-Path: <darwi@linutronix.de> X-Amavis-Spam-Status: No, score=-4.4 tagged_above=-10000 required=5.3 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -4.6 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailing-List: <debian-kernel@lists.debian.org> archive/latest/158157 List-ID: <debian-kernel.lists.debian.org> List-URL: <https://lists.debian.org/debian-kernel/> List-Archive: https://lists.debian.org/msgid-search/avHD-3JwbQofpJdH@lx-t490 Approved: robomod@news.nic.it Lines: 44 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: Clark Williams <clrkwllms@kernel.org>, Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@redhat.com>, Nathan Chancellor <nathan@kernel.org>, Nicolas Schier <nsc@kernel.org>, Sebastian Andrzej Siewior <bigeasy@linutronix.de>, Frederic Weisbecker <frederic@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jonathan Corbet <corbet@lwn.net>, John Ogness <john.ogness@linutronix.de>, Derek Barbosa <debarbos@redhat.com>, Zbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>, Daan De Meyer <daan.j.demeyer@gmail.com>, Luca Boccassi <luca.boccassi@gmail.com>, linux-rt-devel@lists.linux.dev, debian-kernel@lists.debian.org, linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, arighi@nvidia.com X-Original-Date: Mon, 9 Nov 2026 14:00:43 +0100 X-Original-Message-ID: <avHD-3JwbQofpJdH@lx-t490> X-Original-References: <20261106091922.7560-1-darwi@linutronix.de> <20261106091922.7560-4-darwi@linutronix.de> <9729a4c6-22f9-4102-b62f-c76a75488240@gmail.com>