public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/1] Add KUnit tests for llist
@ 2024-09-17  0:51 Artur Alves
  2024-09-17  0:51 ` [PATCH v3 1/1] lib/llist_kunit.c: add " Artur Alves
  2024-09-19 16:01 ` [PATCH v3 0/1] Add " Shuah Khan
  0 siblings, 2 replies; 11+ messages in thread
From: Artur Alves @ 2024-09-17  0:51 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel, Brendan Higgins, David Gow, Rae Moar,
	linux-kselftest, kunit-dev
  Cc: n, andrealmeid, vinicius, diego.daniel.professional

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 adds tests for the llist data structure, defined in 
include/linux/llist.h, and is inspired by the KUnit tests for the doubly
linked list in lib/list-test.c[3].

It is important to note that this patch depends on the patch referenced
in [4], as it utilizes the newly created lib/tests/ subdirectory.

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

---
Changes in v3:
    - Resolved checkpatch warnings:
        - Renamed tests for macros starting with 'for_each'
        - Removed link from commit message
    - Replaced hardcoded constants with ENTRIES_SIZE
    - Updated initialization of llist_node array
    - Fixed typos
    - Update Kconfig.debug message for llist_kunit 

Changes in v2:
    - Add MODULE_DESCRIPTION()
    - Move the tests from lib/llist_kunit.c to lib/tests/llist_kunit.c
    - Change the license from "GPL v2" to "GPL"

Artur Alves (1):
  lib/llist_kunit.c: add KUnit tests for llist

 lib/Kconfig.debug       |  11 ++
 lib/tests/Makefile      |   1 +
 lib/tests/llist_kunit.c | 358 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 370 insertions(+)
 create mode 100644 lib/tests/llist_kunit.c

-- 
2.46.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-10-03  6:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-17  0:51 [PATCH v3 0/1] Add KUnit tests for llist Artur Alves
2024-09-17  0:51 ` [PATCH v3 1/1] lib/llist_kunit.c: add " Artur Alves
2024-10-02 20:27   ` Rae Moar
2024-10-03  6:56   ` David Gow
2024-09-19 16:01 ` [PATCH v3 0/1] Add " Shuah Khan
2024-09-19 22:27   ` Artur Alves Cavalcante de Barros
2024-09-20  7:10   ` David Gow
2024-09-20 15:10     ` Shuah Khan
2024-09-21  3:07       ` Artur Alves Cavalcante de Barros
2024-09-21  2:49     ` Artur Alves Cavalcante de Barros
2024-09-23 15:48       ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox