linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 8/8] unit/test-uhid: Add /uhid/event/feature test
Date: Wed, 21 May 2014 18:01:09 +0300	[thread overview]
Message-ID: <1400684469-2693-8-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1400684469-2693-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 unit/test-uhid.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/unit/test-uhid.c b/unit/test-uhid.c
index a8aba9b..85e1356 100644
--- a/unit/test-uhid.c
+++ b/unit/test-uhid.c
@@ -243,6 +243,10 @@ static const struct uhid_event ev_output = {
 	.type = UHID_OUTPUT,
 };
 
+static const struct uhid_event ev_feature = {
+	.type = UHID_FEATURE,
+};
+
 static void test_client(gconstpointer data)
 {
 	struct context *context = create_context(data);
@@ -270,11 +274,19 @@ static void handle_output(struct uhid_event *ev, void *user_data)
 	context_quit(user_data);
 }
 
+static void handle_feature(struct uhid_event *ev, void *user_data)
+{
+	g_assert_cmpint(ev->type, ==, UHID_FEATURE);
+
+	context_quit(user_data);
+}
+
 static void test_server(gconstpointer data)
 {
 	struct context *context = create_context(data);
 
 	bt_uhid_register(context->uhid, UHID_OUTPUT, handle_output, context);
+	bt_uhid_register(context->uhid, UHID_FEATURE, handle_feature, context);
 
 	g_idle_add(send_pdu, context);
 
@@ -292,6 +304,7 @@ int main(int argc, char *argv[])
 	define_test("/uhid/command/input", test_client, event(&ev_input));
 
 	define_test("/uhid/event/output", test_server, event(&ev_output));
+	define_test("/uhid/event/feature", test_server, event(&ev_feature));
 
 	return g_test_run();
 }
-- 
1.9.0


  parent reply	other threads:[~2014-05-21 15:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-21 15:01 [PATCH BlueZ 1/8] shared/uhid: Add initial API Luiz Augusto von Dentz
2014-05-21 15:01 ` [PATCH BlueZ 2/8] unit/test-uhid: Add /uhid/command/create test Luiz Augusto von Dentz
2014-05-21 15:01 ` [PATCH BlueZ 3/8] unit/test-uhid: Add /uhid/command/destroy test Luiz Augusto von Dentz
2014-05-21 15:01 ` [PATCH BlueZ 4/8] unit/test-uhid: Add /uhid/command/feature_answer test Luiz Augusto von Dentz
2014-05-21 15:01 ` [PATCH BlueZ 5/8] unit/test-uhid: Add /uhid/command/input test Luiz Augusto von Dentz
2014-05-21 15:01 ` [PATCH BlueZ 6/8] shared/uhid: Add implemetation of bt_uhid_register/bt_uhid_unregister Luiz Augusto von Dentz
2014-05-21 15:01 ` [PATCH BlueZ 7/8] unit/test-uhid: Add /uhid/event/output test Luiz Augusto von Dentz
2014-05-21 15:01 ` Luiz Augusto von Dentz [this message]
2014-05-23 13:51 ` [PATCH BlueZ 1/8] shared/uhid: Add initial API Luiz Augusto von Dentz

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=1400684469-2693-8-git-send-email-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@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).