Thread (30 messages) flat view 30 messages, 8 authors, 2024-03-18

Re: [PATCH 01/14] bug/kunit: Core support for suppressing warning backtraces

From: Kees Cook <hidden>
Date: 2024-03-12 22:01:00
Also in: dri-devel, linux-arch, linux-arm-kernel, linux-doc, linux-kselftest, linux-riscv, linux-s390, linux-sh, lkml, loongarch

On Tue, Mar 12, 2024 at 10:02:56AM -0700, Guenter Roeck wrote:
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.

Cc: Dan Carpenter <redacted>
Cc: Daniel Diaz <redacted>
Cc: Naresh Kamboju <redacted>
Cc: Kees Cook <redacted>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Yup, this looks fine to me.

Reviewed-by: Kees Cook <redacted>

-- 
Kees Cook
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help