Skip to content

printk: KUnit: Followup fixes for the new KUnit test

Petr Mladek linux-hardening lkml oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3printk: ringbuffer: Explain why the KUnit test ignores failed writeskernel/printk/printk_ringbuffer_kunit_test.c+13 -01 reply
2/3printk: kunit: support offstack cpumaskkernel/printk/printk_ringbuffer_kunit_test.c+12 -68 replies
3/3printk: kunit: Fix __counted_by() in struct prbtest_rbdatakernel/printk/printk_ringbuffer_kunit_test.c+27 -201 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchThomas WeißschuhJohn Ogness
SeriesR-b
1/3R-b
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] printk: KUnit: Followup fixes for the new KUnit test

Hi,

this patchset puts together some followup fixes for the new KUnit test which were discussed on several locations.

1st patch:

+ adds a comment exaplaing why the test ignores pr_reserve() failures.

+ was proposed at https://lore.kernel.org/r/[email protected]

+ Thomas Weißschuh added into v4 of the original patch but I have already comitted v3 in the meantime, see
https://lore.kernel.org/r/[email protected]

2nd patch:

+ dynamically allocates a cpu bitmap to make the code safe even on systems with many CPUs.

+ v1 was set by Arnd Bergmann but it had some problems, see

    https://lore.kernel.org/r/[email protected]

+ This version just integreates the proposed fixes from
https://lore.kernel.org/r/[email protected]

3rd patch:

+ stores "size" instead on "len" in struct prbtest_rbdata so that is can be used to check code sanity by __counted_by(size).

+ fixes https://lore.kernel.org/r/[email protected]

+ it is based on the idea from Thomas Weißschuh, see

    20250626082605-c5fbbb88-f6cc-4659-bea0-a283cdb58e81@linutronix.de

Sigh, I should have asked people to send new patches. But this looked easier and I wanted to clean the table.

Arnd Bergmann (1):
printk: kunit: support offstack cpumask

Petr Mladek (2):
printk: ringbuffer: Explain why the KUnit test ignores failed writes
printk: kunit: Fix __counted_by() in struct prbtest_rbdata

 kernel/printk/printk_ringbuffer_kunit_test.c | 78 +++++++++++++-------
 1 file changed, 52 insertions(+), 26 deletions(-)
Signature · 1 line
2.50.0