Add KUnit tests for the llist data structure. They test the vast
majority of methods and macros defined in include/linux/llist.h.
These are inspired by the existing tests for the 'list' doubly
linked in lib/list-test.c [1]. Each test case (llist_test_x)
tests the behaviour of the llist function/macro 'x'.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/list-test.c
Signed-off-by: Artur Alves <arturacb@xxxxxxxxx>
---
lib/Kconfig.debug | 11 ++
lib/Makefile | 1 +
lib/llist_kunit.c | 360 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 372 insertions(+)
create mode 100644 lib/llist_kunit.c
+MODULE_LICENSE("GPL v2");