[PATCH v2 0/1] Add KUnit tests for kfifo

Diego Vieira posted 1 patch 1 year, 3 months ago
lib/Kconfig.debug       |  14 +++
lib/tests/Makefile      |   1 +
lib/tests/kfifo_kunit.c | 224 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 239 insertions(+)
create mode 100644 lib/tests/kfifo_kunit.c
[PATCH v2 0/1] Add KUnit tests for kfifo
Posted by Diego Vieira 1 year, 3 months ago
Hi all,

This is part of a hackathon organized by LKCAMP [1], focused on writing
tests using KUnit. We reached out a while ago asking for advice on what would
be a useful contribution [2] and ended up choosing data structures that did
not yet have tests.

This patch series depends on the patch that moves the KUnit tests on lib/
into lib/tests/ [3].

This patch adds tests for the kfifo data structure, defined in
include/linux/kfifo.h, and is inspired by the KUnit tests for the doubly
linked list in lib/tests/list-test.c (previously at lib/list-test.c) [4].

[1] https://lkcamp.dev/about/
[2] https://lore.kernel.org/all/Zktnt7rjKryTh9-N@arch/
[3] https://lore.kernel.org/all/20240720181025.work.002-kees@kernel.org/
[4] https://elixir.bootlin.com/linux/latest/source/lib/list-test.c

---
Changes in v2:
    - Add MODULE_DESCRIPTION()
    - Move the tests from lib/kfifo-test.c to lib/tests/kfifo_kunit.c

Diego Vieira (1):
  lib/tests/kfifo_kunit.c: add tests for the kfifo structure

 lib/Kconfig.debug       |  14 +++
 lib/tests/Makefile      |   1 +
 lib/tests/kfifo_kunit.c | 224 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 239 insertions(+)
 create mode 100644 lib/tests/kfifo_kunit.c

-- 
2.34.1
Re: [PATCH v2 0/1] Add KUnit tests for kfifo
Posted by Vinicius Peixoto 1 year, 2 months ago
Hi all,

On 9/3/24 18:36, Diego Vieira wrote:
> Hi all,
> 
> This is part of a hackathon organized by LKCAMP [1], focused on writing
> tests using KUnit. We reached out a while ago asking for advice on what would
> be a useful contribution [2] and ended up choosing data structures that did
> not yet have tests.
> 
> This patch series depends on the patch that moves the KUnit tests on lib/
> into lib/tests/ [3].
> 
> This patch adds tests for the kfifo data structure, defined in
> include/linux/kfifo.h, and is inspired by the KUnit tests for the doubly
> linked list in lib/tests/list-test.c (previously at lib/list-test.c) [4].
> 
> [1] https://lkcamp.dev/about/
> [2] https://lore.kernel.org/all/Zktnt7rjKryTh9-N@arch/
> [3] https://lore.kernel.org/all/20240720181025.work.002-kees@kernel.org/
> [4] https://elixir.bootlin.com/linux/latest/source/lib/list-test.c
> 
> ---
> Changes in v2:
>      - Add MODULE_DESCRIPTION()
>      - Move the tests from lib/kfifo-test.c to lib/tests/kfifo_kunit.c
> 
> Diego Vieira (1):
>    lib/tests/kfifo_kunit.c: add tests for the kfifo structure
> 
>   lib/Kconfig.debug       |  14 +++
>   lib/tests/Makefile      |   1 +
>   lib/tests/kfifo_kunit.c | 224 ++++++++++++++++++++++++++++++++++++++++
>   3 files changed, 239 insertions(+)
>   create mode 100644 lib/tests/kfifo_kunit.c
> 

Gentle ping, is there any chance could we get some opinions on this? :-)

I know that this patch is quite big, plus LPC just ended and people are 
probably very busy, but we would really appreciate some feedback on this 
one. Thanks in advance!

Vinicius
Re: [PATCH v2 0/1] Add KUnit tests for kfifo
Posted by Shuah Khan 1 year, 2 months ago
On 9/21/24 17:15, Vinicius Peixoto wrote:
> Hi all,
> 
> On 9/3/24 18:36, Diego Vieira wrote:
>> Hi all,
>>
>> This is part of a hackathon organized by LKCAMP [1], focused on writing
>> tests using KUnit. We reached out a while ago asking for advice on what would
>> be a useful contribution [2] and ended up choosing data structures that did
>> not yet have tests.
>>
>> This patch series depends on the patch that moves the KUnit tests on lib/
>> into lib/tests/ [3].
>>
>> This patch adds tests for the kfifo data structure, defined in
>> include/linux/kfifo.h, and is inspired by the KUnit tests for the doubly
>> linked list in lib/tests/list-test.c (previously at lib/list-test.c) [4].
>>
>> [1] https://lkcamp.dev/about/
>> [2] https://lore.kernel.org/all/Zktnt7rjKryTh9-N@arch/
>> [3] https://lore.kernel.org/all/20240720181025.work.002-kees@kernel.org/
>> [4] https://elixir.bootlin.com/linux/latest/source/lib/list-test.c
>>
>> ---
>> Changes in v2:
>>      - Add MODULE_DESCRIPTION()
>>      - Move the tests from lib/kfifo-test.c to lib/tests/kfifo_kunit.c
>>
>> Diego Vieira (1):
>>    lib/tests/kfifo_kunit.c: add tests for the kfifo structure
>>
>>   lib/Kconfig.debug       |  14 +++
>>   lib/tests/Makefile      |   1 +
>>   lib/tests/kfifo_kunit.c | 224 ++++++++++++++++++++++++++++++++++++++++
>>   3 files changed, 239 insertions(+)
>>   create mode 100644 lib/tests/kfifo_kunit.c
>>
> 
> Gentle ping, is there any chance could we get some opinions on this? :-)
> 
> I know that this patch is quite big, plus LPC just ended and people are probably very busy, but we would really appreciate some feedback on this one. Thanks in advance!
> 

Which repo is this based on?

thanks,
-- Shuah