]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpio: add kunit test cases for the GPIO subsystem
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Fri, 22 May 2026 13:42:18 +0000 (15:42 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Tue, 26 May 2026 09:19:54 +0000 (11:19 +0200)
commita6d2a3b403cbcbcdb3ffdb63e52ac090c1003d05
treec28fa4768c8483412757afe57b2464e105e45125
parent136569e6bc7b2d62e6777ef47caf0a417d70bf4a
gpio: add kunit test cases for the GPIO subsystem

Add a module containing kunit test cases for GPIO core. The idea is to
use it to test functionalities that can't easily be tested from
user-space with kernel selftests or GPIO character device test suites
provided by the libgpiod package.

For now add test cases that verify software node based lookup and ensure
that a GPIO provider unbinding with active consumers does not cause a
crash.

Reviewed-by: David Gow <david@davidgow.net>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260522-gpiolib-kunit-v3-3-b15fe6987430@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/gpiolib-kunit.c [new file with mode: 0644]