]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lib/tests/kfifo_kunit.c: add tests for the kfifo structure
authorDiego Vieira <diego.daniel.professional@gmail.com>
Mon, 2 Dec 2024 07:55:41 +0000 (15:55 +0800)
committerKees Cook <kees@kernel.org>
Tue, 11 Feb 2025 02:25:39 +0000 (18:25 -0800)
commit4d557cb4998654441a1018a9f6550d59098c0c9d
tree81866ca2123430fac7821dbaa5a28314d2db744e
parentdb6fe4d61ece24193eb4d94a82d967501d53358c
lib/tests/kfifo_kunit.c: add tests for the kfifo structure

Add KUnit tests for the kfifo data structure.
They test the vast majority of macros defined in the kfifo
header (include/linux/kfifo.h).

These are inspired by the existing tests for the doubly
linked list in lib/tests/list-test.c (previously at lib/list-test.c) [1].

Note that this patch depends on the patch that moves the KUnit tests on
lib/ into lib/tests/ [2].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/list-test.c?h=v6.11-rc6
[2] https://lore.kernel.org/all/20240720181025.work.002-kees@kernel.org/

Signed-off-by: Diego Vieira <diego.daniel.professional@gmail.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Rae Moar <rmoar@google.com>
Link: https://lore.kernel.org/r/20241202075545.3648096-5-davidgow@google.com
Signed-off-by: Kees Cook <kees@kernel.org>
lib/Kconfig.debug
lib/tests/Makefile
lib/tests/kfifo_kunit.c [new file with mode: 0644]