diff mbox series

[libgpiod,1/2] tests: create mismatch between chip and bulk offsets in wait_multiple

Message ID 20201014034758.19427-2-warthog618@gmail.com
State New
Headers show
Series tests: improve wait_multiple coverage | expand

Commit Message

Kent Gibson Oct. 14, 2020, 3:47 a.m. UTC
Create a mismatch between the chip offsets and the bulk offsets to ensure
the implementation is not dependent on them matching.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
---
 tests/tests-event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bartosz Golaszewski Oct. 14, 2020, 8:45 a.m. UTC | #1
On Wed, Oct 14, 2020 at 5:48 AM Kent Gibson <warthog618@gmail.com> wrote:
>
> Create a mismatch between the chip offsets and the bulk offsets to ensure
> the implementation is not dependent on them matching.
>
> Signed-off-by: Kent Gibson <warthog618@gmail.com>
> ---
>  tests/tests-event.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/tests-event.c b/tests/tests-event.c
> index 6066e45..a43f865 100644
> --- a/tests/tests-event.c
> +++ b/tests/tests-event.c
> @@ -546,7 +546,7 @@ GPIOD_TEST_CASE(wait_multiple, 0, { 8 })
>         gpiod_test_return_if_failed();
>
>         gpiod_line_bulk_init(&bulk);
> -       for (i = 0; i < 8; i++) {
> +       for (i = 1; i < 8; i++) {
>                 line = gpiod_chip_get_line(chip, i);
>                 g_assert_nonnull(line);
>                 gpiod_test_return_if_failed();
> --
> 2.28.0
>

Applied, thanks!

Bartosz
diff mbox series

Patch

diff --git a/tests/tests-event.c b/tests/tests-event.c
index 6066e45..a43f865 100644
--- a/tests/tests-event.c
+++ b/tests/tests-event.c
@@ -546,7 +546,7 @@  GPIOD_TEST_CASE(wait_multiple, 0, { 8 })
 	gpiod_test_return_if_failed();
 
 	gpiod_line_bulk_init(&bulk);
-	for (i = 0; i < 8; i++) {
+	for (i = 1; i < 8; i++) {
 		line = gpiod_chip_get_line(chip, i);
 		g_assert_nonnull(line);
 		gpiod_test_return_if_failed();