libgpiod: fix gpiod-cxx-test failed test case
PATCH 1/1 libgpiod: fix gpiod-cxx-test failed test case
From: Libo Chen <[email protected]>
Signed-off-by Libo Chen <[email protected]>
--- ...ts-set-direction-when-reconfiguring-.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-set-direction-when-reconfiguring-.patch
meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-set-direction-when-reconfiguring-.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 8c7126b7b5dee0ed5433cf9265ccc79095d53939 Mon Sep 17 00:00:00 2001 +From: Bartosz Golaszewski <[email protected]> +Date: Mon, 8 Jul 2024 11:48:27 +0200 +Subject: [PATCH] bindings: cxx: tests: set direction when reconfiguring lines + +Linux kernel commit b44039638741 ("gpiolib: cdev: Ignore reconfiguration +without direction") made the direction setting mandatory for line config +passed to the kernel when reconfiguring requested lines. Fix the C++ test +case which doesn't do it and now fails due to the rest of the settings +being ignored. + +Reviewed-by: Kent Gibson <[email protected]> +Link: https://lore.kernel.org/r/[email protected] +Signed-off-by: Bartosz Golaszewski <[email protected]> + +Upstream-Status: Backport +[https://web.git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/commit/?id=3e224d885b1de54fe5510b9c5e7296260a1a4507] + +Signed-off-by: Libo Chen <[email protected]> +--- + bindings/cxx/tests/tests-line-request.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/bindings/cxx/tests/tests-line-request.cpp b/bindings/cxx/tests/tests-line-request.cpp +index 9632ae0..6e29532 100644 +--- a/bindings/cxx/tests/tests-line-request.cpp ++++ b/bindings/cxx/tests/tests-line-request.cpp +@@ -208,6 +208,7 @@ TEST_CASE("values can be read", "[line-request]") + .add_line_settings( + offs, + ::gpiod::line_settings() ++ .set_direction(direction::INPUT) + .set_active_low(true)) + ); + +-- +2.44.1 +
Signature · 1 line
2.34.1
Quoted 2 lines · libo.chen.cn via lists.openembedded.org
...ts-set-direction-when-reconfiguring-.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+)
Did you forget to add the patch to SRC_URI, or am I missing something?
Gyorgy,
Thanks for helping me catch that mistake. I will send V2 version.
Libo
-----Original Message-----
From: Gyorgy Sarvari <[email protected]>
Sent: Tuesday, March 11, 2025 9:21 PM
To: Chen, Libo (CN) <[email protected]>; [email protected]
Subject: Re: [oe] [meta-oe][scarthgap][PATCH] libgpiod: fix gpiod-cxx-test failed test case
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 2 lines · libo.chen.cn via lists.openembedded.org
...ts-set-direction-when-reconfiguring-.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+)
Did you forget to add the patch to SRC_URI, or am I missing something?