Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: linux-gpio@vger.kernel.org
Cc: Khem Raj <khem.raj@oss.qualcomm.com>,
	Bartosz Golaszewski <brgl@kernel.org>
Subject: [PATCH libgpiod 0/2] dbus: client: tests: fix racy gpiocli monitor tests
Date: Wed, 25 Nov 2026 00:00:43 -0800	[thread overview]
Message-ID: <20261125080045.2410076-1-raj.khem@gmail.com> (raw)

From: Khem Raj <khem.raj@oss.qualcomm.com>

test_monitor_all_lines_on_request and test_monitor_multiple_lines_by_name
toggle one line twice, with another line in between, before reading the
monitor output. gpio-sim can deliver both changes of the first line as
one interrupt, the rising edge is lost and the tests fail intermittently.
These two patches make the tests wait for each event before triggering
the next one.

Running gpiocli-test.bash in a qemux86-64 guest (kernel 7.2.15) whose
vCPUs were pinned to one host CPU and kept busy, it failed in 7 of 10
runs without these patches (both tests fail) and passed 10 of 10 runs
with them. Without the CPU contention both variants passed 30 of 30 runs.

Khem Raj (2):
  dbus: client: tests: wait for each event in
    test_monitor_all_lines_on_request
  dbus: client: tests: wait for each event in
    test_monitor_multiple_lines_by_name

 dbus/client/gpiocli-test.bash | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)


             reply	other threads:[~2026-11-25  8:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  8:00 Khem Raj [this message]
2026-11-25  8:00 ` [PATCH libgpiod 1/2] dbus: client: tests: wait for each event in test_monitor_all_lines_on_request Khem Raj
2026-11-25  8:00 ` [PATCH libgpiod 2/2] dbus: client: tests: wait for each event in test_monitor_multiple_lines_by_name Khem Raj

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=20261125080045.2410076-1-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=brgl@kernel.org \
    --cc=khem.raj@oss.qualcomm.com \
    --cc=linux-gpio@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox