All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Kraglak <marcin.kraglak@tieto.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCHv2 9/9] unit/test-gatt: Add /TP/GAR/CL/BI-11-C test
Date: Wed, 19 Nov 2014 12:26:33 +0100	[thread overview]
Message-ID: <1416396393-19997-10-git-send-email-marcin.kraglak@tieto.com> (raw)
In-Reply-To: <1416396393-19997-1-git-send-email-marcin.kraglak@tieto.com>

Verify Generic Attribute Profile client behavior when the Read Using
Characteristic UUID procedure fails due to insufficient encryption
key size.
---
 unit/test-gatt.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index 4265de1..9ded1f0 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -654,6 +654,12 @@ const struct test_step test_read_by_type_5 = {
 	.expected_att_ecode = 0x05,
 };
 
+const struct test_step test_read_by_type_6 = {
+	.handle = 0x0001,
+	.end_handle = 0xffff,
+	.expected_att_ecode = 0x0c,
+};
+
 static void read_by_type_cb(bool success, uint8_t att_ecode,
 						struct bt_gatt_result *result,
 						void *user_data)
@@ -880,5 +886,12 @@ int main(int argc, char *argv[])
 			raw_pdu(0x08, 0x01, 0x00, 0xff, 0xff, 0x0d, 0x2a),
 			raw_pdu(0x01, 0x08, 0x0b, 0x00, 0x05));
 
+	define_test_att("/TP/GAR/CL/BI-11-C", test_read_by_type, &uuid_char_16,
+			&test_read_by_type_6,
+			raw_pdu(0x02, 0x00, 0x02),
+			raw_pdu(0x03, 0x00, 0x02),
+			raw_pdu(0x08, 0x01, 0x00, 0xff, 0xff, 0x0d, 0x2a),
+			raw_pdu(0x01, 0x08, 0x0b, 0x00, 0x0c));
+
 	return g_test_run();
 }
-- 
1.9.3


  parent reply	other threads:[~2014-11-19 11:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 11:26 [PATCHv2 0/9] Read-by-type functionality Marcin Kraglak
2014-11-19 11:26 ` [PATCHv2 1/9] shared/gatt-helpers: Add read-by-type functionality Marcin Kraglak
2014-11-19 11:26 ` [PATCHv2 2/9] shared/gatt-helpers: Add iterator to read_by_type results Marcin Kraglak
2014-11-19 11:26 ` [PATCHv2 3/9] unit/test-gatt: Add /TP/GAR/CL/BV-03-C-1 test Marcin Kraglak
2014-11-19 11:26 ` [PATCHv2 4/9] unit/test-gatt: Add /TP/GAR/CL/BV-03-C-2 test Marcin Kraglak
2014-11-19 11:26 ` [PATCHv2 5/9] unit/test-gatt: Add /TP/GAR/CL/BI-06-C test Marcin Kraglak
2014-11-19 11:26 ` [PATCHv2 6/9] unit/test-gatt: Add /TP/GAR/CL/BI-07-C test Marcin Kraglak
2014-11-19 11:26 ` [PATCHv2 7/9] unit/test-gatt: Add /TP/GAR/CL/BI-09-C test Marcin Kraglak
2014-11-19 11:26 ` [PATCHv2 8/9] unit/test-gatt: Add /TP/GAR/CL/BI-10-C test Marcin Kraglak
2014-11-19 11:26 ` Marcin Kraglak [this message]
2014-11-19 16:56 ` [PATCHv2 0/9] Read-by-type functionality 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=1416396393-19997-10-git-send-email-marcin.kraglak@tieto.com \
    --to=marcin.kraglak@tieto.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.