[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABVgOS=+y-yO+4G6-77Cry3LH-bhA+MLsrT-G45ZbxNUyEBRhw@mail.gmail.com>
Date: Sat, 29 Mar 2025 16:03:49 +0800
From: David Gow <davidgow@...gle.com>
To: Alessandro Carminati <acarmina@...hat.com>
Cc: linux-kselftest@...r.kernel.org, David Airlie <airlied@...il.com>,
Arnd Bergmann <arnd@...db.de>, Maíra Canal <mcanal@...lia.com>,
Dan Carpenter <dan.carpenter@...aro.org>, Kees Cook <keescook@...omium.org>,
Daniel Diaz <daniel.diaz@...aro.org>, Arthur Grillo <arthurgrillo@...eup.net>,
Brendan Higgins <brendan.higgins@...ux.dev>, Naresh Kamboju <naresh.kamboju@...aro.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>, Maxime Ripard <mripard@...nel.org>,
Ville Syrjälä <ville.syrjala@...ux.intel.com>,
Daniel Vetter <daniel@...ll.ch>, Thomas Zimmermann <tzimmermann@...e.de>,
Guenter Roeck <linux@...ck-us.net>, Alessandro Carminati <alessandro.carminati@...il.com>,
Jani Nikula <jani.nikula@...el.com>, dri-devel@...ts.freedesktop.org,
kunit-dev@...glegroups.com, linux-arch@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-riscv@...ts.infradead.org,
linux-s390@...r.kernel.org, linux-sh@...r.kernel.org,
loongarch@...ts.linux.dev, x86@...nel.org,
Linux Kernel Functional Testing <lkft@...aro.org>
Subject: Re: [PATCH v4 01/14] bug/kunit: Core support for suppressing warning backtraces
On Thu, 13 Mar 2025 at 19:44, Alessandro Carminati <acarmina@...hat.com> wrote:
>
> From: Guenter Roeck <linux@...ck-us.net>
>
> Some unit tests intentionally trigger warning backtraces by passing
> bad parameters to API functions. Such unit tests typically check the
> return value from those calls, not the existence of the warning backtrace.
>
> Such intentionally generated warning backtraces are neither desirable
> nor useful for a number of reasons.
> - They can result in overlooked real problems.
> - A warning that suddenly starts to show up in unit tests needs to be
> investigated and has to be marked to be ignored, for example by
> adjusting filter scripts. Such filters are ad-hoc because there is
> no real standard format for warnings. On top of that, such filter
> scripts would require constant maintenance.
>
> One option to address problem would be to add messages such as "expected
> warning backtraces start / end here" to the kernel log. However, that
> would again require filter scripts, it might result in missing real
> problematic warning backtraces triggered while the test is running, and
> the irrelevant backtrace(s) would still clog the kernel log.
>
> Solve the problem by providing a means to identify and suppress specific
> warning backtraces while executing test code. Since the new functionality
> results in an image size increase of about 1% if CONFIG_KUNIT is enabled,
> provide configuration option KUNIT_SUPPRESS_BACKTRACE to be able to disable
> the new functionality. This option is by default enabled since almost all
> systems with CONFIG_KUNIT enabled will want to benefit from it.
>
> Cc: Dan Carpenter <dan.carpenter@...aro.org>
> Cc: Daniel Diaz <daniel.diaz@...aro.org>
> Cc: Naresh Kamboju <naresh.kamboju@...aro.org>
> Cc: Kees Cook <keescook@...omium.org>
> Tested-by: Linux Kernel Functional Testing <lkft@...aro.org>
> Acked-by: Dan Carpenter <dan.carpenter@...aro.org>
> Reviewed-by: Kees Cook <keescook@...omium.org>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
> Signed-off-by: Alessandro Carminati <acarmina@...hat.com>
> ---
Thanks Guenter & Alessandro: I'm very happy with this.
Reviewed-by: David Gow <davidgow@...gle.com>
-- David
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5281 bytes)
Powered by blists - more mailing lists