tests: add check of event offset to wait_multiple
authorKent Gibson <warthog618@gmail.com>
Wed, 14 Oct 2020 03:47:58 +0000 (11:47 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 14 Oct 2020 13:56:09 +0000 (15:56 +0200)
The offset field is added for uAPI v2, so extend the test to check that
the value returned is correct.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
tests/tests-event.c

index 6066e457aecb4d32b0e3066b832790a0132fe8b8..9b66f056bf732cdff2695c9800f2ec4c934e16da 100644 (file)
@@ -570,6 +570,7 @@ GPIOD_TEST_CASE(wait_multiple, 0, { 8 })
        ret = gpiod_line_event_read(line, &ev);
        g_assert_cmpint(ret, ==, 0);
        g_assert_cmpint(ev.event_type, ==, GPIOD_LINE_EVENT_RISING_EDGE);
+       g_assert_cmpint(ev.offset, ==, 4);
 }
 
 GPIOD_TEST_CASE(get_fd_when_values_requested, 0, { 8 })