From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Vincent Fazio <vfazio@xes-inc.com>,
Kent Gibson <warthog618@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Erik Schilling <erik.schilling@linaro.org>,
Phil Howard <phil@gadgetoid.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Koichiro Den <koichiro.den@canonical.com>
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
linux-gpio@vger.kernel.org
Subject: [PATCH libgpiod 1/3] bindings: cxx: tests: disable GPIO simulator before releasing it
Date: Mon, 03 Feb 2025 14:25:03 +0100 [thread overview]
Message-ID: <20250203-fix-gpiosim-in-bindings-v1-1-d2c9e0f3a29d@linaro.org> (raw)
In-Reply-To: <20250203-fix-gpiosim-in-bindings-v1-0-d2c9e0f3a29d@linaro.org>
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Linux kernel commit 8bd76b3d3f3a ("gpio: sim: lock up configfs that an
instantiated device depends on") uncovered an issue in C++ bindings
tests where the GPIO simulator device is not disabled before removing its
configfs entries. Add a call to gpiosim_dev_disable() to the
gpiosim::chip's destructor.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
bindings/cxx/tests/gpiosim.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bindings/cxx/tests/gpiosim.cpp b/bindings/cxx/tests/gpiosim.cpp
index 4bda5a2..cdecd8d 100644
--- a/bindings/cxx/tests/gpiosim.cpp
+++ b/bindings/cxx/tests/gpiosim.cpp
@@ -115,7 +115,7 @@ chip::chip(chip&& other)
chip::~chip()
{
-
+ ::gpiosim_dev_disable(this->_m_priv->dev.get());
}
chip& chip::operator=(chip&& other)
--
2.45.2
next prev parent reply other threads:[~2025-02-03 13:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-03 13:25 [PATCH libgpiod 0/3] bindings: fix ordering of releasing of gpiosim resources Bartosz Golaszewski
2025-02-03 13:25 ` Bartosz Golaszewski [this message]
2025-02-03 13:25 ` [PATCH libgpiod 2/3] bindings: python: tests: disable device before releasing the bank Bartosz Golaszewski
2025-02-03 13:25 ` [PATCH libgpiod 3/3] bindings: rust: tests: disable device before dropping the resources Bartosz Golaszewski
2025-02-04 4:18 ` Viresh Kumar
2025-02-04 8:29 ` Bartosz Golaszewski
2025-02-05 13:35 ` [PATCH libgpiod 0/3] bindings: fix ordering of releasing of gpiosim resources 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=20250203-fix-gpiosim-in-bindings-v1-1-d2c9e0f3a29d@linaro.org \
--to=brgl@bgdev.pl \
--cc=bartosz.golaszewski@linaro.org \
--cc=erik.schilling@linaro.org \
--cc=koichiro.den@canonical.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=phil@gadgetoid.com \
--cc=vfazio@xes-inc.com \
--cc=viresh.kumar@linaro.org \
--cc=warthog618@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).