linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: linux-gpio@vger.kernel.org, bgolaszewski@baylibre.com
Cc: Kent Gibson <warthog618@gmail.com>
Subject: [libgpiod][PATCH 2/2] tests: add check of event offset to wait_multiple
Date: Wed, 14 Oct 2020 11:47:58 +0800	[thread overview]
Message-ID: <20201014034758.19427-3-warthog618@gmail.com> (raw)
In-Reply-To: <20201014034758.19427-1-warthog618@gmail.com>

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>
---
 tests/tests-event.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/tests-event.c b/tests/tests-event.c
index a43f865..0e5effe 100644
--- a/tests/tests-event.c
+++ b/tests/tests-event.c
@@ -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 })
-- 
2.28.0


  parent reply	other threads:[~2020-10-14  9:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14  3:47 [libgpiod][PATCH 0/2] tests: improve wait_multiple coverage Kent Gibson
2020-10-14  3:47 ` [libgpiod][PATCH 1/2] tests: create mismatch between chip and bulk offsets in wait_multiple Kent Gibson
2020-10-14  8:45   ` Bartosz Golaszewski
2020-10-14  3:47 ` Kent Gibson [this message]
2020-10-14  8:50   ` [libgpiod][PATCH 2/2] tests: add check of event offset to wait_multiple Bartosz Golaszewski
2020-10-14 13:56   ` Bartosz Golaszewski
2020-10-14  7:50 ` [libgpiod][PATCH 0/2] tests: improve wait_multiple coverage Bartosz Golaszewski
2020-10-14  8:37   ` Kent Gibson
2020-10-14  8:39     ` Bartosz Golaszewski
2020-10-14  8:46       ` Kent Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201014034758.19427-3-warthog618@gmail.com \
    --to=warthog618@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linux-gpio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).