All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lin Tzu Yang <rongh7426@gmail.com>
To: Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Shuah Khan <shuah@kernel.org>
Cc: Bamvor Jian Zhang <bamv2005@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-gpio@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] gpio: virtuser: add a selftest
Date: Tue,  1 Dec 2026 22:27:01 +0800	[thread overview]
Message-ID: <20261201142703.900902-1-rongh7426@gmail.com> (raw)

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


             reply	other threads:[~2026-12-01 14:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 14:27 Lin Tzu Yang [this message]
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
2026-12-02  8:48 ` [PATCH 0/2] gpio: virtuser: add a selftest Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261201142703.900902-1-rongh7426@gmail.com \
    --to=rongh7426@gmail.com \
    --cc=bamv2005@gmail.com \
    --cc=brgl@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linusw@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.