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

Petr Mladek posted 3 patches 3 months, 1 week ago
kernel/printk/printk_ringbuffer_kunit_test.c | 78 +++++++++++++-------
1 file changed, 52 insertions(+), 26 deletions(-)
[PATCH 0/3] printk: KUnit: Followup fixes for the new KUnit test
Posted by Petr Mladek 3 months, 1 week ago
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/aFUiQESkXjFIGqez@pathway.suse.cz

  + 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/20250620-printk-ringbuffer-test-v4-1-8df873f1f3e0@linutronix.de


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/20250620192554.2234184-1-arnd@kernel.org

  + This version just integreates the proposed fixes from
    https://lore.kernel.org/r/aFkuqaFn3BOvsPT-@pathway.suse.cz


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/eaea66b9-266a-46e7-980d-33f40ad4b215@sabinyo.mountain

  + 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(-)

-- 
2.50.0

Re: [PATCH 0/3] printk: KUnit: Followup fixes for the new KUnit test
Posted by Petr Mladek 2 months, 4 weeks ago
On Wed 2025-07-02 11:51:54, Petr Mladek wrote:
> 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/aFUiQESkXjFIGqez@pathway.suse.cz
> 
>   + 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/20250620-printk-ringbuffer-test-v4-1-8df873f1f3e0@linutronix.de
> 
> 
> 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/20250620192554.2234184-1-arnd@kernel.org
> 
>   + This version just integreates the proposed fixes from
>     https://lore.kernel.org/r/aFkuqaFn3BOvsPT-@pathway.suse.cz
> 
> 
> 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/eaea66b9-266a-46e7-980d-33f40ad4b215@sabinyo.mountain
> 
>   + it is based on the idea from Thomas Weißschuh, see
>     20250626082605-c5fbbb88-f6cc-4659-bea0-a283cdb58e81@linutronix.de


JFYI, the 1st and 3rd patch has been committed into printk/linux.git,
branch rework/ringbuffer-kunit-test.

These two patches were reviewed by Thomas and John and were accepted.

The 2nd patch is independent and has an issue. I am going to send
an update separately.

Best Regards,
Petr
Re: [PATCH 0/3] printk: KUnit: Followup fixes for the new KUnit test
Posted by Thomas Weißschuh 3 months, 1 week ago
On Wed, Jul 02, 2025 at 11:51:54AM +0200, Petr Mladek wrote:
> Hi,
> 
> this patchset puts together some followup fixes for the new KUnit test
> which were discussed on several locations.

<snip>

> 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(-)

For the series:

Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>