All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Khem Raj <raj.khem@gmail.com>,
	Bruce Ashfield <bruce.ashfield@gmail.com>,
	openembedded-devel@lists.openembedded.org
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [meta-oe][PATCH 1/2] libgpiod: fix ptests failure
Date: Tue,  4 Feb 2025 09:47:41 +0100	[thread overview]
Message-ID: <20250204084742.26325-1-brgl@bgdev.pl> (raw)

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Linux kernel commit 8bd76b3d3f3a ("gpio: sim: lock up configfs that an
instantiated device depends on") revealed an issue in libgpiod bindings
tests where a GPIO simulator device is not disabled before removing its
configfs entries.

Add a patch (already submitted upstream) that fixes the observed ptest
failures.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 ...ts-disable-GPIO-simulator-before-rel.patch | 34 +++++++++++++++++++
 .../recipes-support/libgpiod/libgpiod_2.2.bb  |  5 ++-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-disable-GPIO-simulator-before-rel.patch

diff --git a/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-disable-GPIO-simulator-before-rel.patch b/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-disable-GPIO-simulator-before-rel.patch
new file mode 100644
index 0000000000..9747613aa6
--- /dev/null
+++ b/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-disable-GPIO-simulator-before-rel.patch
@@ -0,0 +1,34 @@
+From 7df2bb4f51281166633d4acbcff5763150add3fa Mon Sep 17 00:00:00 2001
+From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Date: Mon, 3 Feb 2025 13:20:41 +0100
+Subject: [PATCH] bindings: cxx: tests: disable GPIO simulator before releasing it
+
+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>
+
+Upstream-Status: Submitted [https://lore.kernel.org/all/20250203-fix-gpiosim-in-bindings-v1-1-d2c9e0f3a29d@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
+
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb b/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
index 259ee04d28..054d378451 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
@@ -11,7 +11,10 @@ LIC_FILES_CHKSUM = " \
 
 FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}-2.x:"
 
-SRC_URI += "file://gpio-manager.init"
+SRC_URI += " \
+    file://gpio-manager.init \
+    file://0001-bindings-cxx-tests-disable-GPIO-simulator-before-rel.patch \
+"
 
 SRC_URI[sha256sum] = "ee29735890eb1cc0e4b494001da5163d1a9c4735343201d22485db313601ca07"
 
-- 
2.45.2



             reply	other threads:[~2025-02-04  8:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04  8:47 Bartosz Golaszewski [this message]
2025-02-04  8:47 ` [meta-python][PATCH 2/2] python3-gpiod: fix ptest failure 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=20250204084742.26325-1-brgl@bgdev.pl \
    --to=brgl@bgdev.pl \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=bruce.ashfield@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=raj.khem@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 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.