summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-disable-GPIO-simulator-before-rel.patch
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2025-02-04 09:47:41 +0100
committerKhem Raj <raj.khem@gmail.com>2025-02-04 10:14:36 -0800
commit9d8ef59ebd47625059387c2841e96b5f8098f5bb (patch)
tree5123feb90a851aa2069da3a92e4c30af84ac5e9e /meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-disable-GPIO-simulator-before-rel.patch
parentdef1bb7c1eec9afaea37d932cae5addeff5e4ee9 (diff)
downloadmeta-openembedded-9d8ef59ebd47625059387c2841e96b5f8098f5bb.tar.gz
libgpiod: fix ptests failure
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> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-disable-GPIO-simulator-before-rel.patch')
-rw-r--r--meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-disable-GPIO-simulator-before-rel.patch34
1 files changed, 34 insertions, 0 deletions
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 @@
1From 7df2bb4f51281166633d4acbcff5763150add3fa Mon Sep 17 00:00:00 2001
2From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
3Date: Mon, 3 Feb 2025 13:20:41 +0100
4Subject: [PATCH] bindings: cxx: tests: disable GPIO simulator before releasing it
5
6Linux kernel commit 8bd76b3d3f3a ("gpio: sim: lock up configfs that an
7instantiated device depends on") uncovered an issue in C++ bindings
8tests where the GPIO simulator device is not disabled before removing its
9configfs entries. Add a call to gpiosim_dev_disable() to the
10gpiosim::chip's destructor.
11
12Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
13
14Upstream-Status: Submitted [https://lore.kernel.org/all/20250203-fix-gpiosim-in-bindings-v1-1-d2c9e0f3a29d@linaro.org/]
15---
16 bindings/cxx/tests/gpiosim.cpp | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/bindings/cxx/tests/gpiosim.cpp b/bindings/cxx/tests/gpiosim.cpp
20index 4bda5a2..cdecd8d 100644
21--- a/bindings/cxx/tests/gpiosim.cpp
22+++ b/bindings/cxx/tests/gpiosim.cpp
23@@ -115,7 +115,7 @@ chip::chip(chip&& other)
24
25 chip::~chip()
26 {
27-
28+ ::gpiosim_dev_disable(this->_m_priv->dev.get());
29 }
30
31 chip& chip::operator=(chip&& other)
32--
332.45.2
34