Re: [libgpiod][PATCH] bindings: cxx: tests: set direction when reconfiguring lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 08, 2024 at 11:48:27AM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
>
> 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.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> ---
>  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 af8b979..a99bd44 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))
>  		);
>

My bad - I hadn't tried the C++ or Rust tests with that patch, or I
would've patched these myself.

Reviewed-by: Kent Gibson <warthog618@xxxxxxxxx>

for both C++ and Rust.





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux