mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/3] gpio: add kunit tests for GPIO core
@ 2026-05-22 13:42 Bartosz Golaszewski
  2026-05-22 13:42 ` [PATCH v3 1/3] kunit: provide kunit_platform_device_register_full() Bartosz Golaszewski
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Bartosz Golaszewski @ 2026-05-22 13:42 UTC (permalink / raw)
  To: Brendan Higgins, David Gow, Rae Moar, Linus Walleij, Bartosz Golaszewski
  Cc: linux-kselftest, kunit-dev, linux-kernel, linux-gpio,
	Bartosz Golaszewski

This series adds a first batch of kunit tests for GPIO core. I intend to
gradually add more coverage for functionalities that can't really be
tested from user-space with the existing kernel selftests or libgpiod
tests.

Merging strategy: with an Ack from kunit maintainers, this can go
through the GPIO tree for v7.2.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
Changes in v3:
- Make kunit_platform_device_unregister() handle both cases of platform
  devices created with kunit_platform_device_alloc() +
  kunit_platform_device_add() and kunit_platform_device_register_full()
  (sashiko)
- Link to v2: https://patch.msgid.link/20260520-gpiolib-kunit-v2-0-cc9db39881da@oss.qualcomm.com

Changes in v2:
- Remove cases of kunit killing a thread on test failure with device lock
  taken
- Fix a platform device leak on test failure
- New patch: provide kunit_platform_device_unregister()
- Link to v1: https://patch.msgid.link/20260518-gpiolib-kunit-v1-0-131ec646c4df@oss.qualcomm.com

---
Bartosz Golaszewski (3):
      kunit: provide kunit_platform_device_register_full()
      kunit: provide kunit_platform_device_unregister()
      gpio: add kunit test cases for the GPIO subsystem

 drivers/gpio/Kconfig            |   8 +
 drivers/gpio/Makefile           |   1 +
 drivers/gpio/gpiolib-kunit.c    | 358 ++++++++++++++++++++++++++++++++++++++++
 include/kunit/platform_device.h |   6 +
 lib/kunit/platform.c            |  64 +++++++
 5 files changed, 437 insertions(+)
---
base-commit: 80dd246accce631c328ea43294e53b2b2dd2aa32
change-id: 20260326-gpiolib-kunit-d7f1b5541ffa

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>


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

end of thread, other threads:[~2026-05-26  9:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-22 13:42 [PATCH v3 0/3] gpio: add kunit tests for GPIO core Bartosz Golaszewski
2026-05-22 13:42 ` [PATCH v3 1/3] kunit: provide kunit_platform_device_register_full() Bartosz Golaszewski
2026-05-26  8:58   ` David Gow
2026-05-22 13:42 ` [PATCH v3 2/3] kunit: provide kunit_platform_device_unregister() Bartosz Golaszewski
2026-05-26  8:58   ` David Gow
2026-05-22 13:42 ` [PATCH v3 3/3] gpio: add kunit test cases for the GPIO subsystem Bartosz Golaszewski
2026-05-26  8:58   ` David Gow
2026-05-26  9:19     ` Bartosz Golaszewski
2026-05-25 13:33 ` [PATCH v3 0/3] gpio: add kunit tests for GPIO core Linus Walleij
2026-05-26  9:20 ` Bartosz Golaszewski

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

all inboxes | Powered by JetHome®