Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] gpio: virtuser: add a selftest
@ 2026-12-01 14:27 Lin Tzu Yang
  2026-12-01 14:27 ` [PATCH 1/2] Documentation: gpio: virtuser: list the accepted direction values Lin Tzu Yang
  2026-12-01 14:27 ` [PATCH 2/2] selftests: gpio: add a test for gpio-virtuser Lin Tzu Yang
  0 siblings, 2 replies; 4+ messages in thread
From: Lin Tzu Yang @ 2026-12-01 14:27 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Shuah Khan
  Cc: Bamvor Jian Zhang, Jonathan Corbet, linux-gpio, linux-kselftest,
	linux-doc, linux-kernel

gpio-virtuser has no selftest yet, while gpio-sim and gpio-aggregator
do. Patch 2 adds one, driving the consumer against a gpio-sim chip.
Writing it turned up a documentation mismatch, fixed in patch 1, and
two driver bugs, fixed separately against gpio/for-current:

- "gpio: virtuser: fix one-byte overflow in lookup entry key show"
  (20261201024151.872725-1-rongh7426@gmail.com, sent earlier today):
  test 2.3 reads back a 4095-byte key. Without that fix the read
  still returns the right bytes, but KASAN reports the overflow.
- "gpio: virtuser: report the right dev_name before the device is
  live" (sent just before this series): without it, test 1.1 fails
  with "dev_name changed when the consumer was enabled".

Testing, in a QEMU/KVM arm64 guest (KASAN, configfs-next 2e0fad9d2eae,
gpio-sim and gpio-virtuser built in, busybox userspace):
- with both fixes: PASS in five runs, no kernel warnings
- without the dev_name fix: FAIL at 1.1, as expected
- with only the dev_name fix: PASS, plus two KASAN reports from 2.3

The series is against gpio/for-next.

This series was written with the help of an AI coding assistant
(Claude). I ran the tests above and reviewed the changes.

Lin Tzu Yang (2):
  Documentation: gpio: virtuser: list the accepted direction values
  selftests: gpio: add a test for gpio-virtuser

 .../admin-guide/gpio/gpio-virtuser.rst        |   5 +-
 tools/testing/selftests/gpio/Makefile         |   3 +-
 tools/testing/selftests/gpio/config           |   2 +
 tools/testing/selftests/gpio/gpio-virtuser.sh | 420 ++++++++++++++++++
 4 files changed, 427 insertions(+), 3 deletions(-)
 create mode 100755 tools/testing/selftests/gpio/gpio-virtuser.sh

-- 
2.47.3


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

end of thread, other threads:[~2026-12-01 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 14:27 [PATCH 0/2] gpio: virtuser: add a selftest Lin Tzu Yang
2026-12-01 14:27 ` [PATCH 1/2] Documentation: gpio: virtuser: list the accepted direction values Lin Tzu Yang
2026-12-01 14:27 ` [PATCH 2/2] selftests: gpio: add a test for gpio-virtuser Lin Tzu Yang
2026-12-01 14:39   ` sashiko-bot

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