Re: [PATCH v3] lib/tests: add KUnit tests for the priority sorted list (plist)

From: Eric Biggers

Date: Sat Nov 07 2026 - 14:20:32 EST


On Fri, Nov 06, 2026 at 11:06:58PM -0800, Andrew Morton wrote:
> > Add lib/tests/plist_kunit.c, a KUnit suite that exercises plist_add(),
> > plist_del() and plist_requeue() and validates the invariants documented
> > in include/linux/plist.h after every operation:
>
> Thanks, let's get this into the pipeline for testing.
>
> How does this play with CONFIG_TRIM_UNUSED_KSYMS=y, btw?
>
> That darn thing removes symbols which no in-tree modules are using. So
> the 20-odd selftests/ which build and load modules can break in
> interesting ways.
>
> Although they're shipped with the tree, such modules are out-of-tree
> for kbuild purposes. If they work, it's by sheer luck - all the
> exports they want happen to already be used by some in-tree module.
>
> I assume that kunit-loaded modules suffer from the same issue.

No, KUnit test modules don't have the same issue, since they are in-tree
modules.

Also their kconfig options use 'depends on' as needed. However, in the
case of plist.c, that is unconditional already.

- Eric