linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michał Narajowski" <michal.narajowski@codecoup.pl>
To: linux-bluetooth@vger.kernel.org
Cc: "Michał Narajowski" <michal.narajowski@codecoup.pl>
Subject: [PATCH BlueZ 2/2] tools/mgmt-tester: Test Set Appearance support in different modes
Date: Mon, 19 Sep 2016 14:33:35 +0200	[thread overview]
Message-ID: <1474288415-16308-3-git-send-email-michal.narajowski@codecoup.pl> (raw)
In-Reply-To: <1474288415-16308-1-git-send-email-michal.narajowski@codecoup.pl>

---
 tools/mgmt-tester.c | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 91b5aa7..75736bf 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -6351,6 +6351,24 @@ static const uint8_t set_scan_rsp_data_appearance1[] = {
 
 static const uint8_t set_appearance_param[2] = { 0x54, 0x65 };
 
+static const struct generic_data set_appearance_not_supported = {
+	.send_opcode = MGMT_OP_SET_APPEARANCE,
+	.send_param = set_appearance_param,
+	.send_len = sizeof(set_appearance_param),
+	.expect_status = MGMT_STATUS_NOT_SUPPORTED,
+	.expect_param = NULL,
+	.expect_len = 0,
+};
+
+static const struct generic_data set_appearance_success = {
+	.send_opcode = MGMT_OP_SET_APPEARANCE,
+	.send_param = set_appearance_param,
+	.send_len = sizeof(set_appearance_param),
+	.expect_status = MGMT_STATUS_SUCCESS,
+	.expect_param = NULL,
+	.expect_len = 0,
+};
+
 static const struct generic_data add_advertising_with_appearance1 = {
 	.setup_settings = settings_powered_le,
 	.setup_send_opcode = MGMT_OP_SET_APPEARANCE,
@@ -7872,6 +7890,21 @@ int main(int argc, char *argv[])
 					setup_add_advertising_duration,
 					test_command_generic, 3);
 
+	test_bredr("Set appearance - BR/EDR only",
+					&set_appearance_not_supported,
+					NULL,
+					test_command_generic);
+
+	test_bredrle("Set appearance - BR/EDR LE",
+					&set_appearance_success,
+					NULL,
+					test_command_generic);
+
+	test_le("Set appearance - LE only",
+					&set_appearance_success,
+					NULL,
+					test_command_generic);
+
 	test_bredrle("Add Advertising - Scan rsp flags 1",
 					&add_advertising_with_local_name1,
 					setup_set_local_name,
-- 
2.7.4


  parent reply	other threads:[~2016-09-19 12:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 12:33 [PATCH] Bluetooth: Set appearance only for LE capable controllers Michał Narajowski
2016-09-19 12:33 ` [PATCH BlueZ 1/2] doc/mgmt-api: Allow set " Michał Narajowski
2016-09-21 18:13   ` Szymon Janc
2016-09-19 12:33 ` Michał Narajowski [this message]
2016-09-19 18:49 ` [PATCH] Bluetooth: Set " Johan Hedberg

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=1474288415-16308-3-git-send-email-michal.narajowski@codecoup.pl \
    --to=michal.narajowski@codecoup.pl \
    --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).