Commit Graph

858 Commits

Author SHA1 Message Date
Gowtham Anandha Babu
1cb7336476 unit/test-gatt: Add TP/GAW/CL/BI-23-C test
Verify Generic Attribute Profile client behavior when the Write
Characteristic Descriptor procedure fails due to insufficient
authentication.
2015-03-05 13:38:20 +02:00
Gowtham Anandha Babu
26db6562d6 unit/test-gatt: Add TP/GAW/CL/BI-22-C test
Verify Generic Attribute Profile client behavior when the Write
Characteristic Descriptor procedure fails due to insufficient
authorization.
2015-03-05 13:38:20 +02:00
Gowtham Anandha Babu
ff88a48923 unit/test-gatt: Add TP/GAW/CL/BI-21-C test
Verify Generic Attribute Profile client behavior when the Write
Characteristic Descriptor procedure fails due to write not permitted.
2015-03-05 13:38:19 +02:00
Gowtham Anandha Babu
c01823408c unit/test-gatt: Add TP/GAW/CL/BI-20-C test
Verify Generic Attribute Profile client behavior when the Write
Characteristic Descriptor procedure fails due to invalid handle.
2015-03-05 13:38:19 +02:00
Gowtham Anandha Babu
2a70292402 unit/test-gatt: Add TP/GAW/CL/BV-08-C test
Verify that a Generic Attribute Profile client can write a
characteristic descriptor selected by handle.
2015-03-05 13:38:19 +02:00
Bharat Panda
536e92cdb8 unit/test-gatt: Fix TP/GAW/SR/BI-03-C test
The GATT server test cases are supposed to be tested against
ts_small_db and ts_large_db_1. So, Fixed these changes too.
2015-03-03 11:17:49 +02:00
Bharat Panda
b134205526 unit/test-gatt: Fix TP/GAW/SR/BI-02-C test
The GATT server test cases are supposed to be tested against
ts_small_db and ts_large_db_1. So, Fixed those changes too.
2015-03-03 11:16:50 +02:00
Gowtham Anandha Babu
426e5da435 unit/test-gatt: Fix TP/GAW/SR/BV-03-C test
The GATT server test cases are supposed to be tested against
ts_small_db and ts_large_db_1. So, Fixed those changes too.
2015-03-03 11:16:29 +02:00
Marcel Holtmann
05ec2da6cb unit: Fix includes for gobex.h header 2015-03-01 00:27:06 -08:00
Marcel Holtmann
912e0786b8 unit: Fix includes for gdbus.h header 2015-02-28 22:21:58 -08:00
Marcel Holtmann
bc4377edd4 unit: Use local libbluetooth includes 2015-02-28 21:49:36 -08:00
Arman Uguray
373ee416c3 unit/test-gatt: Unref pending discovery requests
This patch adds code to clean up pending discovery requests in
unit/test-gatt, since the recent API changes will cause memory leaks
otherwise.
2015-02-27 19:59:28 -08:00
Bharat Panda
d00d1fa59c unit/test-gatt: Add TP/GAW/SR/BI-03-C test
Verify that a Generic Attribute Profile server can detect and
reject a Write Characteristic Value Request to a non-writeable
Characteristic Value and issue a Write Not Permitted Response.
2015-02-27 17:11:13 +02:00
Bharat Panda
7b8f5250b7 unit/test-gatt: Add TP/GAW/SR/BI-02-C test
Verify that a Generic Attribute Profile server can detect a Write
Characteristic Value Request with an unsupported Characteristic
Value handle and issue an Invalid Handle Response.
2015-02-27 17:11:13 +02:00
Gowtham Anandha Babu
fdca0c1dc9 unit/test-gatt: Add TP/GAW/SR/BV-03-C test
Verify that a Generic Attribute Profile server can support writing
a Characteristic Value selected by handle.
2015-02-27 17:11:13 +02:00
Luiz Augusto von Dentz
2dc64e6de0 unit/test-gatt: Add /TP/GAW/CL/BV-02-C/seclevel test
This add a test for signed write but with security level other than low
so we can verify the code use the write instead of signed write.
2015-02-27 12:50:45 +02:00
Luiz Augusto von Dentz
1a053b132a unit/test-gatt: Add TP/GAW/CL/BV-02-C test
Verify that a Generic Attribute Profile client can write a
characteristic with authentication without response.
2015-02-24 17:28:34 +02:00
Luiz Augusto von Dentz
3a128bdcc5 unit/test-gatt: Add TP/GAW/CL/BV-01-C test
Verify that a Generic Attribute Profile client can issue a
characteristic Write without response.
2015-02-24 16:33:57 +02:00
Gowtham Anandha Babu
5ed616261f unit/test-gatt: Add TP/GAW/CL/BI-06-C test
Verify Generic Attribute Profile client behavior when the Write
Characteristic Value procedure fails due to insufficient encryption
key size.
2015-02-24 15:22:23 +02:00
Gowtham Anandha Babu
032469ec5e unit/test-gatt: Add TP/GAW/CL/BI-05-C test
Verify Generic Attribute Profile client behavior when the
Write Characteristic Value procedure fails due to insufficient
authentication.
2015-02-24 15:22:23 +02:00
Gowtham Anandha Babu
b303edec36 unit/test-gatt: Add TP/GAW/CL/BI-04-C test
Verify Generic Attribute Profile client behavior when the
Write Characteristic Value procedure fails due to insufficient
authorization.
2015-02-24 15:22:23 +02:00
Gowtham Anandha Babu
2c782569cc unit/test-gatt: Add TP/GAW/CL/BI-03-C test
Verify Generic Attribute Profile client behavior when the
Write Characteristic Value procedure fails due to write
not permitted.
2015-02-24 15:22:23 +02:00
Gowtham Anandha Babu
4ff73e6ef2 unit/test-gatt: Add TP/GAW/CL/BI-02-C test
Verify Generic Attribute Profile client behavior when the
Write Characteristic Value procedure fails due to invalid
handle.
2015-02-24 15:22:22 +02:00
Gowtham Anandha Babu
9db9a8cef3 unit/test-gatt: Add TP/GAW/CL/BV-03-C test
Verify that a Generic Attribute Profile client can write a
Characteristic Value selected by handle.
2015-02-24 15:22:22 +02:00
Andrei Emeltchenko
c419c2f3b9 unit/avdtp: Refactor context destroy
destroy_context() function will be used for dummy_tests without
context_execute()
2015-02-22 21:26:25 +01:00
Andrei Emeltchenko
37c942ff2b android/avdtp: Refactor local SEP list handling
In order to deduplicate similar code in android/ and profiles/ we need
to handle local SEP queue outside of avdtp.c. GSList is transformed to
queue.
2015-02-22 21:26:25 +01:00
Andrei Emeltchenko
20890b9d58 unit/avdtp: Add check for too many SEP creation
Test checks that maximum numbers of SEPs registered is MAX_SEID.
2015-02-19 15:21:08 +02:00
Andrei Emeltchenko
62a112bd52 unit/avdtp: Add duplicate SEID test
Add test adding two SEP, then remove first and create another one. With
the current code new SEP has the same SEID (2!). Following patches
fixing the bug.
2015-02-19 15:21:08 +02:00
Andrei Emeltchenko
65b3246571 unit/avdtp: Add SEP register/unregister tests
Add register_sep and unregister_sep testing registering maximum amount
of SEPs.
2015-02-19 15:21:07 +02:00
Luiz Augusto von Dentz
29133a1203 unit/test-gatt: Use tester framework
Our tester framework actually produces much better output.
2015-02-19 13:55:54 +02:00
Bharat Panda
ccea880efd unit/test-gatt: Add TP/GAR/CL/BI-35-C test
Verify Generic Attribute Profile client behavior when an attempt to use
LE transport to execute the Read Characteristic Value procedure on a
characteristic contained within a service defined for use only over
BR/EDR transport.
2015-02-18 17:09:22 +02:00
Bharat Panda
0576dd6b43 unit/test-gatt: Add TP/GAR/CL/BI-34-C test
Verify Generic Attribute Profile client behavior when an attempt to use
BR/EDR transport to execute the Read Characteristic Value procedure on a
characteristic contained within a service defined for use only over
LE transport.
2015-02-18 17:08:54 +02:00
Bharat Panda
07c0cea32d unit/test-gatt: Add TP/GAR/CL/BI-33-C test
Verify Generic Attribute Profile client behavior when the Read Long
Characteristic Descriptor procedure fails due to insufficient encryption
key size.
2015-02-18 17:08:39 +02:00
Bharat Panda
fdad98abab unit/test-gatt: Add TP/GAR/CL/BI-32-C test
Verify Generic Attribute Profile client behavior when the Read Long
Characteristic Descriptor procedure fails due to insufficient
authentication.
2015-02-18 17:08:21 +02:00
Bharat Panda
5c8385cf88 unit/test-gatt: Add TP/GAR/CL/BI-31-C test
Verify Generic Attribute Profile client behavior when the Read Long
Characteristic Descriptor procedure fails due to insufficient
authorization.
2015-02-18 17:08:01 +02:00
Bharat Panda
4348847644 unit/test-gatt: Add TP/GAR/CL/BI-30-C test
Verify Generic Attribute Profile client behavior when the Read Long
Characteristic Descriptor procedure fails due to invalid handle.
2015-02-18 17:07:48 +02:00
Gowtham Anandha Babu
8c7732f136 unit/test-gatt: Add TP/GAR/CL/BI-29-C test
Verify Generic Attribute Profile client behavior when the Read Long
Characteristic Descriptor procedure fails due to invalid offset.
2015-02-18 17:07:34 +02:00
Gowtham Anandha Babu
39c44e8dd8 unit/test-gatt: Add TP/GAR/CL/BI-28-C test
Verify Generic Attribute Profile client behavior when the Read Long
Characteristic Descriptor procedure fails due to read not permitted.
2015-02-18 17:07:19 +02:00
Gowtham Anandha Babu
a8d841c700 unit/test-gatt: Add TP/GAR/CL/BV-07-C/512B test
Verify that a Generic Attribute Profile client can read a characteristic
descriptor by selected handle. The Characteristic Descriptor length is
unknown to the client and might be long with a value of 512 bytes.
2015-02-18 17:06:55 +02:00
Gowtham Anandha Babu
6a34524da7 unit/test-gatt: Add TP/GAR/CL/BV-07-C test
Verify that a Generic Attribute Profile client can read a characteristic
descriptor by selected handle. The Characteristic Descriptor length is
unknown to the client and might be long.
2015-02-18 17:06:23 +02:00
Gowtham Anandha Babu
f1caa9062e unit/test-gatt: Fix invalid handle test case
The main aim of TC TP/GAR/CL/BI-14-C is to check the handle validity.
So, the requested handle in the pdu should be invalid (0x0000).
2015-02-18 17:06:06 +02:00
Marcel Holtmann
8584651a3e unit: Add explicit include for lib/bluetooth.h 2015-02-18 06:24:09 +01:00
Bharat Panda
eecd34b2b6 unit/gatt: Add TP/GAR/CL/BI-27-C test
Verify Generic Attribute Profile client behavior when the Read
Characteristic Descriptor procedure fails due to insufficient
encryption key size.
2015-02-16 14:21:01 +02:00
Bharat Panda
2d7e593a23 unit/gatt: Add TP/GAR/CL/BI-26-C test
Verify Generic Attribute Profile client behavior when the Read
Characteristic Descriptor procedure fails due to insufficient
authentication.
2015-02-16 14:21:01 +02:00
Bharat Panda
72747d4beb unit/gatt: Add TP/GAR/CL/BI-25-C test
Verify Generic Attribute Profile client behavior when the Read
Characteristic Descriptor procedure fails due to insufficient
authorization.
2015-02-16 14:21:01 +02:00
Gowtham Anandha Babu
7f78eb333d unit/gatt: Add TP/GAR/CL/BI-24-C test
Verify Generic Attribute Profile client behavior when the Read
Characteristic Descriptor procedure fails due to invalid handle.
2015-02-16 14:21:01 +02:00
Gowtham Anandha Babu
e184acc86d unit/gatt: Add TP/GAR/CL/BI-23-C test
Verify Generic Attribute Profile client behavior when the Read
Characteristic Descriptor procedure fails due to read not permitted.
2015-02-16 14:21:01 +02:00
Gowtham Anandha Babu
ddbc5d4565 unit/gatt: Add /TP/GAR/CL/BV-06-C test
Verify that a Generic Attribute Profile client can read a
characteristic descriptor selected by handle.
2015-02-16 14:21:01 +02:00
Arman Uguray
0ecc909424 shared/gatt: Pass bt_att instead of bdaddr_t
Replaced the bdaddr_t parameter of gatt_db's read/write functions
and callbacks with a bt_att parameter. The BDADDR information can
be obtained from the bt_att's underlying file descriptor.
2015-02-16 11:01:40 +02:00
Luiz Augusto von Dentz
8c4a1575d3 unit/test-gatt: Fix using printf 2015-02-11 11:33:56 +02:00
Michael Janssen
f7ee661465 unit/test-gatt: Fix minor inconsistency
Add 0x for consistency.
2015-02-11 11:12:11 +02:00
Michael Janssen
6750307fb4 unit/test-gatt: Add TP/GAI/CL/BV-01-C test
Verify that a Generic Attribute Profile client can respond with a
Confirmation to a Characteristic Value Indication.
2015-02-11 11:12:07 +02:00
Michael Janssen
da0bd3942e unit/test-gatt: Add TP/GAI/SR/BV-01-C test
Verify that a Generic Attribute Profile server can send a Characteristic
Value Indication.
2015-02-11 11:12:04 +02:00
Michael Janssen
6258daa2b1 unit/test-gatt: add support for post-tests
Sometimes a check must be made that something happened after all data is
transferred.  A post function on the test step can check.
2015-02-11 11:12:00 +02:00
Michael Janssen
5da6678b83 unit/test-gatt: Add TP/GAN/SR/BV-01-C test
Verify that a Generic Attribute Profile server can send a Characteristic
Value Notification.
2015-02-11 11:11:57 +02:00
Michael Janssen
e423f17fdc unit/test-gatt: Add TP/GAN/CL/BV-01-C test
Verify that a Generic Attribute Profile client can receive a
Characteristic Value Notification and report that to the Upper Tester.
2015-02-11 11:11:54 +02:00
Michael Janssen
68dca88271 unit/test-gatt: Add support for no-actions
With some tests (specifically notification / indication tests), the
client sets up a condition and then the server does something without
a message from the client.  This patch makes it possible to add a
zero-length PDU which indicates that no message is expected from the
client after a server response.
2015-02-11 10:39:25 +02:00
Gowtham Anandha Babu
0d436295e3 unit/test-gatt: Fix duplicate test case number
TP/GAR/CL/BI-22-C was duplicated as TP/GAR/CL/BI-21-C.
2015-02-10 13:16:37 +02:00
Gowtham Anandha Babu
e2c06add31 unit/gatt: Add TP/GAR/CL/BI-05-C test
Verify Generic Attribute Profile client behavior when the Read
Characteristic Value procedure fails due to insufficient encryption
key size.
2015-02-10 13:15:58 +02:00
Gowtham Anandha Babu
4d4426ca40 unit/gatt: Add TP/GAR/CL/BI-04-C test
Verify Generic Attribute Profile client behavior when the Read
Characteristic Value procedure fails due to insufficient authentication.
2015-02-10 13:15:58 +02:00
Luiz Augusto von Dentz
2d9bf236c7 unit/gatt: Add TP/GAR/CL/BI-17-C test
Verify Generic Attribute Profile client behavior when the Read Long
Characteristic Value procedure fails due to insufficient encryption
key size.
2015-01-29 12:57:10 +02:00
Luiz Augusto von Dentz
a91db77030 unit/gatt: Add TP/GAR/CL/BI-16-C test
Verify Generic Attribute Profile client behavior when the Read Long
Characteristic Value procedure fails due to insufficient authentication.
2015-01-29 12:57:06 +02:00
Luiz Augusto von Dentz
8e2ad586a1 unit/gatt: Add TP/GAR/CL/BI-15-C test
Verify Generic Attribute Profile client behavior when the Read Long
Characteristic Value procedure fails due to insufficient authorization.
2015-01-29 12:57:03 +02:00
Luiz Augusto von Dentz
773fbf93ef unit/gatt: Add TP/GAR/CL/BI-14-C test
Verify Generic Attribute Profile client behavior when the Read Long
Characteristic Value procedure fails due to invalid handle.
2015-01-29 12:57:00 +02:00
Luiz Augusto von Dentz
ac5cd6500f unit/gatt: Add TP/GAR/CL/BI-13-C test
Verify Generic Attribute Profile client behavior when the Read Long
Characteristic Value procedure fails due to read not permitted.
2015-01-29 12:56:56 +02:00
Luiz Augusto von Dentz
366966f2b9 unit/gatt: Add TP/GAR/CL/BI-12-C test
Verify Generic Attribute Profile client behavior when the Read Long
Characteristic Value procedure fails due to read not permitted.
2015-01-29 12:56:53 +02:00
Luiz Augusto von Dentz
d058b13664 unit/gatt: Add TP/GAR/CL/BV-04-C/512B test
Verify if long reads works with a value of 512 bytes.
2015-01-29 12:56:43 +02:00
Luiz Augusto von Dentz
319979cc64 unit/gatt: Add TP/GAR/CL/BV-04-C test
Verify that a Generic Attribute Profile client can read a Characteristic
Value by selected handle. The Characteristic Value length is unknown to
the client and might be long.
2015-01-29 12:56:36 +02:00
Luiz Augusto von Dentz
af8eddb15b unit/test-gatt: Fix warnings
This fixes the following warning when compiling with cgcc:

unit/test-gatt.c:631:15: warning: symbol 'read_data_1' was not declared. Should it be static?
unit/test-gatt.c:633:24: warning: symbol 'test_read_1' was not declared. Should it be static?
unit/test-gatt.c:641:24: warning: symbol 'test_read_2' was not declared. Should it be static?
unit/test-gatt.c:647:24: warning: symbol 'test_read_3' was not declared. Should it be static?
unit/test-gatt.c:653:24: warning: symbol 'test_read_4' was not declared. Should it be static?
unit/test-gatt.c:1284:24: warning: symbol 'test_read_by_type_1' was not declared. Should it be static?
unit/test-gatt.c:1292:24: warning: symbol 'test_read_by_type_2' was not declared. Should it be static?
unit/test-gatt.c:1298:24: warning: symbol 'test_read_by_type_3' was not declared. Should it be static?
unit/test-gatt.c:1304:24: warning: symbol 'test_read_by_type_4' was not declared. Should it be static?
unit/test-gatt.c:1310:24: warning: symbol 'test_read_by_type_5' was not declared. Should it be static?
unit/test-gatt.c:1316:24: warning: symbol 'test_read_by_type_6' was not declared. Should it be static?
unit/test-gatt.c:1352:24: warning: symbol 'test_multiple_read_1' was not declared. Should it be static?
unit/test-gatt.c:1360:24: warning: symbol 'test_multiple_read_2' was not declared. Should it be static?
unit/test-gatt.c:1367:24: warning: symbol 'test_multiple_read_3' was not declared. Should it be static?
unit/test-gatt.c:1374:24: warning: symbol 'test_multiple_read_4' was not declared. Should it be static?
unit/test-gatt.c:1381:24: warning: symbol 'test_multiple_read_5' was not declared. Should it be static?
unit/test-gatt.c:1388:24: warning: symbol 'test_multiple_read_6' was not declared. Should it be static?
2015-01-22 15:56:12 +02:00
Michael Janssen
ed6ebbb048 unit/gatt: Add /TP/GAR/SR/BI-30-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Long Characteristic Descriptor Request to an invalid handle and
issue an Invalid Handle Response.
2015-01-22 15:45:09 +02:00
Michael Janssen
d0d8877393 unit/gatt: Add /TP/GAR/SR/BI-29-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Long Characteristic Descriptor Request with an invalid offset and
issue an Invalid Offset Response.
2015-01-22 15:45:09 +02:00
Michael Janssen
6d487981b2 unit/gatt: Add /TP/GAR/SR/BI-28-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Long Characteristic Descriptor Request to a non-readable
characteristic descriptor and issue a Read Not Permitted Response.
2015-01-22 15:45:08 +02:00
Michael Janssen
027c951ae4 unit/gatt: Add /TP/GAR/SR/BV-08-C test
Verify that a Generic Attribute Profile server returns a 0-length part
value when reading a Long Characteristic Descriptor selected by handle
with an offset equal to the length of the Long Characteristic Value.
2015-01-22 15:45:08 +02:00
Michael Janssen
29ec12804b unit/gatt: Add /TP/GAR/SR/BV-07-C test
Verify that a Generic Attribute Profile server can support reading a
Long Characteristic Descriptor selected by handle.
2015-01-22 15:45:08 +02:00
Michael Janssen
2f12537a4a unit/gatt: Add /TP/GAR/SR/BI-24-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Characteristic Descriptor Request with an unsupported
characteristic descriptor handle and issue an Invalid Handle Response.
2015-01-22 15:45:08 +02:00
Michael Janssen
526e29b0d0 unit/gatt: Add /TP/GAR/SR/BI-23-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Characteristic Descriptor Request to a non-readable characteristic
descriptor and issue a Read Not Permitted Response.
2015-01-22 15:45:08 +02:00
Michael Janssen
31ea4a9684 unit/gatt: Add /TP/GAR/SR/BV-06-C test
Verify that a Generic Attribute Profile server can support reading a
characteristic descriptor selected by handle.
2015-01-22 15:45:08 +02:00
Michael Janssen
c0b253a20d unit/gatt: Add /TP/GAR/SR/BI-19-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Multiple Characteristic Value Request including an unsupported
Characteristic Value handle and issue an Invalid Handle Response.
2015-01-22 15:45:08 +02:00
Michael Janssen
c33e6347ea unit/gatt: Add /TP/GAR/SR/BI-18-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Multiple Characteristic Values Request including any non-readable
Characteristic Value and issue a Read Not Permitted Response.
2015-01-22 15:45:08 +02:00
Michael Janssen
6c9456037b unit/gatt: Add /TP/GAR/SR/BV-05-C test
Verify that a Generic Attribute Profile server can support reading
multiple Characteristic Values selected by a set of handles.
2015-01-22 15:45:08 +02:00
Michael Janssen
bac8aff679 unit/gatt: Add /TP/GAR/SR/BI-14-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Long Characteristic Value Request to an invalid handle and issue an
Invalid Handle Response.
2015-01-22 15:45:08 +02:00
Michael Janssen
759ed124dc unit/gatt: Add /TP/GAR/SR/BI-13-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Long Characteristic Value Request with an invalid offset and issue
an Invalid Offset Response.
2015-01-22 15:45:08 +02:00
Michael Janssen
338f51e5ff unit/gatt: Add /TP/GAR/SR/BI-12-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Long Characteristic Value Request to a non-readable Characteristic
Value and issue a Read Not Permitted Response.
2015-01-22 15:45:08 +02:00
Michael Janssen
5e87aaf538 unit/gatt: Add /TP/GAR/SR/BV-04-C test
Verify that a Generic Attribute Profile server can support reading a
long Characteristic Value selected by handle.
2015-01-22 15:45:08 +02:00
Michael Janssen
cd0a46b41f unit/gatt: Add /TP/GAR/SR/BI-08-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Characteristic by UUID Request with an invalid handle range and
issue an Invalid Handle Response.
2015-01-22 15:45:08 +02:00
Michael Janssen
23a225676d unit/gatt: Add /TP/GAR/SR/BI-07-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Characteristic by UUID Request to an unsupported characteristic and
issue an Attribute Not Found Response.
2015-01-22 15:45:08 +02:00
Michael Janssen
99cdaab60c unit/gatt: Add /TP/GAR/SR/BI-06-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Characteristic by UUID Request to a non-readable Characteristic
Value and issue a Read Not Permitted Response.
2015-01-22 15:45:08 +02:00
Michael Janssen
9fe130fda0 unit/gatt: Add /TP/GAR/SR/BV-03-C test
Verify that a Generic Attribute Profile server can support the Read
using Characteristic UUID procedure, using a 16-bit UUID and using a
128-bit UUID if supported.
2015-01-22 15:45:08 +02:00
Michael Janssen
545eb94c31 unit/gatt: Add /TP/GAD/SR/BV-05-C test
Verify that a Generic Attribute Profile server can discover service
Characteristics of a specified UUID, using 16-bit UUIDs, and using
128-bit UUIDs.
2015-01-22 15:45:08 +02:00
Michael Janssen
3f541fab0f unit/gatt: Add /TP/GAD/CL/BV-05-C test
Verify that a Generic Attribute Profile client can discover
characteristics of a specified service, using 16-bit and 128-bit
characteristic UUIDs.
2015-01-22 15:45:08 +02:00
Szymon Janc
b68c03b95d unit/test-queue: Extend /queue/remove_all with NULL data checks
queue_remove_all should correctly handle NULL data.
2015-01-07 20:28:28 -02:00
Szymon Janc
047c1828aa unit/test-queue: Add /queue/remove_all test
This test verify that queue_remove_all propertly sets entries count.
2015-01-07 14:05:43 -02:00
Michael Janssen
bc30ab8b4b unit/gatt: Add /TP/GAR/SR/BI-02-C test
Verify that a Generic Attribute Profile server can detect and reject a
Read Characteristic Value Request with an unsupported Characteristic
Value handle and issue an Invalid Handle Response.
2015-01-06 14:58:23 -02:00
Michael Janssen
733b58800b unit/gatt: Add /TP/GAR/SR/BV-01-C test
Verify that a Generic Attribute Profile server can support reading a
Characteristic Value selected by handle.
2015-01-06 14:58:20 -02:00
Michael Janssen
b28dfba7a0 unit/gatt: Add /TP/GAD/SR/BV-06-C test
Verify that a Generic Attribute Profile server can support a search for
all descriptors of a specified characteristic.
2015-01-06 14:58:17 -02:00
Michael Janssen
af3bcdba81 unit/gatt: Add /TP/GAD/SR/BV-04-C test
Verify that a Generic Attribute Profile server can support a search for
all characteristics of a specified Service, and report all of those
characteristics.
2015-01-06 14:58:14 -02:00
Michael Janssen
cc4d43ca12 unit/gatt: Add /TP/GAD/SR/BV-03-C test
Verify that a Generic Attribute Profile server can support a search for
all Included Services in a specified handle range.
2015-01-06 14:58:11 -02:00
Michael Janssen
8ac948fa1c unit/gatt: Add /TP/GAD/SR/BV-02-C test
Verify that a Generic Attribute Profile server can support discovery of
all particular Primary Services selected by service UUID, using 16-bit
UUIDs, and using 128-bit UUIDs where supported.

128-bit tests will be added once the larger databases with 128-bit UUIDs
are added.
2015-01-06 14:58:08 -02:00
Michael Janssen
c0e4e6dfc1 unit/gatt: Comment cleanup 2015-01-06 14:58:05 -02:00
Michael Janssen
3aa81161b8 unit/gatt: Add Test Spec Large Database 1
Adds a large GATT database definition and initial service discovery test
which satisfies a number of the requirements from the GATT Test Spec
Document.
2015-01-06 14:58:02 -02:00
Michael Janssen
eafa30e2a5 unit/gatt: Rework service db definitions
Introduces a set of macros providing a simple syntax for definining a
test GATT database.

The two defined databases are reconstructed using the new format.
Some old helper methods are not used anymore and are removed.
2015-01-05 10:42:23 -02:00
Michael Janssen
8130ff553d unit/gatt: Add add_desc_with_value function
This function mirrors add_char_with_value and deduplicates some repeated
code from convenience functions.
2015-01-05 10:41:54 -02:00
Michael Janssen
30b7ebd4c1 unit/gatt: Bugfix small database construction
Small DB was constructed without noticing that the last characteristic is
not added, and needs two more handles in the service to hold it.

This patch will also cause unit/gatt to assert if characteristics are
not added when expected.
2015-01-05 10:41:01 -02:00
Marcel Holtmann
65b7b2b8ef unit: Hide output of ECC unit test when --verbose is not specified 2014-12-21 19:56:02 +01:00
Luiz Augusto von Dentz
110edd6661 unit/test-mgmt: Add /mgmt/destroy/1 test
This tests if mgmt_unref can be called within event callback.
2014-12-12 12:24:11 -02:00
Luiz Augusto von Dentz
c423d3e88c unit/test-mgmt: Add /mgmt/unregister/2 test
This tests if mgmt_unregister_index can be called within event callback.
2014-12-12 12:24:11 -02:00
Luiz Augusto von Dentz
2fb97fd691 unit/test-mgmt: Add /mgmt/unregister/1 test
This tests if mgmt_unregister_all can be called within event callback.
2014-12-12 12:24:11 -02:00
Luiz Augusto von Dentz
329c7184d8 unit/test-mgmt: Add /mgmt/event/2 test
This tests if multiple events can be received.
2014-12-12 12:24:11 -02:00
Luiz Augusto von Dentz
601b3c6c07 unit/test-mgmt: Add /mgmt/event/1 test
This tests if an event can be received.
2014-12-12 12:24:10 -02:00
Luiz Augusto von Dentz
5b34d4bcec unit/test-mgmt: Add /mgmt/response/2 test
This tests if an error can be received.
2014-12-12 12:24:10 -02:00
Luiz Augusto von Dentz
14ee81e737 unit/test-mgmt: Add /mgmt/response/1 test
This tests if a success response can be received.
2014-12-12 12:24:10 -02:00
Luiz Augusto von Dentz
c9528d9a36 unit/test-queue: Add /queue/foreach_remove_backward test
This tests queue_remove from queue_foreach callback in backward order.
2014-12-12 12:24:10 -02:00
Luiz Augusto von Dentz
7dade6cd01 unit/test-queue: Add /queue/foreach_remove test
This tests queue_remove from queue_foreach callback.
2014-12-12 12:24:10 -02:00
Michael Janssen
215fe573fc unit/gatt: minor fix for test PDUs 2014-12-10 09:56:58 +02:00
Michael Janssen
e2f3cd0d1e unit/gatt: Add test spec "small test database"
This patch adds the first of a set of databases which are specified by
the Bluetooth GATT Test Specification document.

It is specifically the "small test database" constructed carefully to
fit the first requirement.

It satisfies the following requirements in section 3.3.2 of the GATT TS:
1. One small test database whose services fit into a single minimum
   sized PDU, with only 16-biy UUIDs
3. At least one of those has a Primary Service at the MAX handle
8. All have some services that are simple, and some that include other
   services
9. Each has at last one instance where the handle of an included service
   is before the handle of the including service
11. Each has instances of simple characteristics (no descriptors) and
    complex characteristics (multiple descriptors)
12. Each has instances of complex characteristics with 16-bit and
    128-bit characteristic descriptor UUIDs, and these are in no
    particular order.
2014-12-10 09:56:53 +02:00
Michael Janssen
89e701a929 unit/gatt: Use source db for server_tests
Use the passed-in gatt_db for server tests instead of populating
with the same db every time.
2014-12-10 09:56:48 +02:00
Michael Janssen
cb6777d2ae unit/gatt: Define repeated MTU PDUs
The MTU PDUs are repeated many times in the code, add a define for them.
Also use "PDUS" instead of "PDU" because these macros contain multiples.
2014-12-10 09:56:35 +02:00
Michael Janssen
e5af5138b1 lib/uuid: Simplify BT base UUIDs when possible
When converting a UUID from string to bt_uuid_t, prefer using
the 16-bit version when possible, which should generate shorter
sequences by increasing the number of 16-bit types.
2014-12-10 09:54:23 +02:00
Arman Uguray
20dd67fd18 shared/gatt-db: Add UUID arg to foreach_service
This patch adds the "uuid" argument to gatt_db_foreach_service, which
invokes the callback for a service only if "uuid" is NULL or if it
matches the GATT service UUID.
2014-12-09 14:49:08 +02:00
Szymon Janc
7757bc6c7a unit: List all enum values in switch
As described in coding style M10.
2014-12-08 14:00:29 +01:00
Michael Janssen
eed45ab621 Remove unused old test db structures 2014-12-05 16:58:58 +02:00
Michael Janssen
45f877065f unit/gatt: Use gatt_db for test data
using gatt_db for test data makes tests clearer and
is a step towards adding server tests from the spec by
that must be run against multiple databases easily.
2014-12-05 16:58:58 +02:00
Andrei Emeltchenko
34c3a51a05 unit/test-gatt: Fix possible crash
If write fails len would be negative and should not be passed to
util_hexdump otherwise it might attempt to access invalid memory.
2014-12-04 14:26:57 +02:00
Luiz Augusto von Dentz
7f5766984c unit/test-queue: Fix memory leak 2014-12-03 20:54:39 +02:00
Arman Uguray
37a39606f5 unit/test-gatt: Use gatt-db for CLIENT tests
This patch rewrites parts of unit/test-gatt that verify the contents
of a shared/gatt-client to use the client's gatt-db instead of the
service iterators.
2014-12-03 17:06:19 +02:00
Arman Uguray
c536877682 shared/gatt-client: Store services in gatt_db
This patch rewrites the service discovery logic inside
shared/gatt-client. The internal service_list structure has been
entirely removed and services are stored in a gatt_db instance.
Initially, gatt-client creates and owns the life-time of the gatt_db.
2014-12-03 17:06:18 +02:00
Johan Hedberg
51f3b1b8b0 unit/test-ecc: Add debug key sample test 2014-12-03 16:32:47 +02:00
Johan Hedberg
dcf1028680 unit/test-ecc: Refactor sample testing code into common function 2014-12-03 16:32:47 +02:00
Johan Hedberg
c8293fdbf1 unit/test-ecc: Add sample data from core spec 2014-12-03 16:32:47 +02:00
Johan Hedberg
a59e8c97fa unit: Add unit test for ECC
This patch adds unit tests for the ECC code. Also this test code has
been taken from https://github.com/kmackay/easy-ecc.
2014-12-03 16:32:45 +02:00
Luiz Augusto von Dentz
1e64bbc81d shared/gatt-db: Add reference counting
This adds reference counting support.
2014-12-02 16:07:50 +02:00
Arman Uguray
28e66d9b31 unit/test-queue: Add /queue/push_after test
This tests the queue_push_after function.
2014-11-28 14:03:03 +02:00
Arman Uguray
3f63bdd135 unit/test-gatt: Add /TP/GAD/SR/BV-01-C test
Verify that a Generic Attribute Profile server can support a search for
all Primary Services it contains.
2014-11-24 22:54:06 +02:00
Arman Uguray
8f1a3c9dab unit/test-gatt: Add /TP/GAC/SR/BV-01-C test
Verify that a Generic Attribute Profile server can accept an Exchange
MTU Request and respond with an Exchange MTU response.
2014-11-24 22:54:05 +02:00
Lukasz Rymanowski
7c5c536550 unit/test-hfp: Fix parsing empty string test
Empty string shall be ignored by AT parser and no response shall be
sent. Therefore this test should close HFP connection just after empty
string is sent, otherwise test hungs.
2014-11-24 12:56:40 +01:00
Lukasz Rymanowski
8d4261c864 unit/test-hfp: Add test for reading \rAT+X\r 2014-11-24 12:56:39 +01:00
Marcin Kraglak
c5bb353be2 unit/test-gatt: Add /TP/GAR/CL/BI-22-C test
Verify Generic Attribute Profile client behavior when the
Read Multiple Characteristic Values procedure fails due to
encryption key size.
2014-11-20 11:10:22 +02:00
Marcin Kraglak
c0041c33db unit/test-gatt: Add /TP/GAR/CL/BI-21-C test
Verify Generic Attribute Profile client behavior when the
Read Multiple Characteristic Values procedure fails due to
insufficient authentication.
2014-11-20 11:10:22 +02:00
Marcin Kraglak
550dd160f8 unit/test-gatt: Add /TP/GAR/CL/BI-20-C test
Verify Generic Attribute Profile client behavior when the
Read Multiple Characteristic Values procedure fails due to
insufficient authorization.
2014-11-20 11:10:22 +02:00
Marcin Kraglak
dc85ed6c63 unit/test-gatt: Add /TP/GAR/CL/BI-19-C test
Verify Generic Attribute Profile client behavior when the
Read Multiple Characteristic Values procedure fails due to
valid handle.
2014-11-20 11:10:22 +02:00
Marcin Kraglak
47c5c9441a unit/test-gatt: Add /TP/GAR/CL/BI-18-C test
Verify Generic Attribute Profile client behavior when
the Read Multiple Characteristic Values procedure fails due
to read not permitted.
2014-11-20 11:10:22 +02:00
Marcin Kraglak
94feb717f7 unit/test-gatt: Add /TP/GAR/CL/BV-05-C test
Verify that a Generic Attribute Profile client can read multiple
Characteristic Values selected by set of handles.
2014-11-20 11:10:22 +02:00
Marcin Kraglak
be21643bd5 unit/test-gatt: Add /TP/GAR/CL/BI-11-C test
Verify Generic Attribute Profile client behavior when the Read Using
Characteristic UUID procedure fails due to insufficient encryption
key size.
2014-11-19 18:04:32 +02:00
Marcin Kraglak
6cacdffcb1 unit/test-gatt: Add /TP/GAR/CL/BI-10-C test
Verify Generic Attribute Profile client behavior when the Read Using
Characteristic UUID procedure fails due to insufficient authentication
2014-11-19 18:04:32 +02:00
Marcin Kraglak
01dd3c69b4 unit/test-gatt: Add /TP/GAR/CL/BI-09-C test
Verify Generic Attribute Profile client behavior when the Read Using
Characteristic UUID procedure fails due to insufficient authorization.
2014-11-19 18:04:32 +02:00
Marcin Kraglak
048af7d7e2 unit/test-gatt: Add /TP/GAR/CL/BI-07-C test
Verify Generic Attribute Profile client behavior when
the Read Using Characteristic UUID procedure fails due to
attribute not found.
2014-11-19 18:04:31 +02:00
Marcin Kraglak
3e1fb9f4eb unit/test-gatt: Add /TP/GAR/CL/BI-06-C test
Verify Generic Attribute Profile client behavior when the Read
Using Characteristic UUID procedure fails due to read not permitted.
2014-11-19 18:04:31 +02:00
Marcin Kraglak
c5e34a8093 unit/test-gatt: Add /TP/GAR/CL/BV-03-C-2 test
Verify that a Generic Attribute Profile client can read
a Characteristic Value selected by UUID using a 128-bit UUID.
2014-11-19 18:04:31 +02:00
Marcin Kraglak
eb375e8d3c unit/test-gatt: Add /TP/GAR/CL/BV-03-C-1 test
Verify that a Generic Attribute Profile client can read a
Characteristic Value selected by UUID using a 16-bit UUID.
2014-11-19 18:04:31 +02:00
Marcin Kraglak
83cbfc0fad unit/test-gatt: Create PDU macro with initial discovery
Don't duplicate PDU data used in a few gatt-client test cases.
2014-11-19 17:59:30 +02:00
Luiz Augusto von Dentz
dbf12268ac unit/test-queue: Add /queue/destroy_remove test
This tests queue_remove from queue_destroy callback.
2014-11-18 16:34:06 +02:00
Luiz Augusto von Dentz
c67995192c unit/test-gatt: Add debug for bt_att 2014-11-17 10:42:04 +02:00
Marcin Kraglak
227370ec54 unit/test-gatt: Fix not calling test step function 2014-11-14 14:52:40 +02:00
Luiz Augusto von Dentz
d6bf5e87b3 unit/test-avrcp: Fix tests on big endian 2014-11-09 21:57:21 +02:00
Michael Janssen
c6cd3f52e4 gattrib: Remove unused GATTRIB_ALL_EVENTS
In prep to use shared stack, this is unused and not functionally
supported by bt_att.
2014-11-06 17:39:14 +02:00
Michael Janssen
7353c6a4de unit-gattrib: Fix uninitialized variable 2014-11-06 17:39:14 +02:00
Marcin Kraglak
67ea423b03 unit/test-gatt: Add TP/GAR/CL/BI-03-C test
Verify Generic Attribute Profile client behavior when
the Read Characteristic Value procedure fails due to
insufficient authorization.
2014-11-06 17:39:14 +02:00
Marcin Kraglak
a7ea758c4c unit/test-gatt: Add TP/GAR/CL/BI-02-C test
Verify Generic Attribute Profile client behavior when
the Read Characteristic Value procedure fails due to
read not permitted.
2014-11-06 17:39:14 +02:00
Marcin Kraglak
830f92dc6a unit/test-gatt: Add TP/GAR/CL/BI-01-C test
Verify Generic Attribute Profile client behavior when the
Read Characteristic Value procedure fails due to invalid handle.
2014-11-06 17:39:13 +02:00
Marcin Kraglak
ecd2b8468e unit/test-gatt: Add /TP/GAR/CL/BV-01-C test
Verify that a Generic Attribute Profile client can read
a Characteristic Value selected by handle.
2014-11-06 17:39:13 +02:00
Marcin Kraglak
b3ca6b3f45 unit/test-gatt: Verify found services
Register ready_callback in bt_gatt_client to verify services,
characteristics and descriptors found during discovery.
2014-11-06 17:39:13 +02:00
Marcin Kraglak
6cad2038bd unit/test-gatt: Add macros defining tests with type
Simplify macros for defining test cases.
2014-11-06 17:39:13 +02:00
Marcin Kraglak
29d3fdcaf9 unit/test-gatt: Add TP/GAD/CL/BV-06-C test
Verify that a Generic Attribute Profile client can find all
Descriptors of a specified Characteristic.
2014-11-06 17:39:13 +02:00
Marcin Kraglak
16fd0ed583 unit/test-gatt: Use one generic search callback
In these callbacks only success is verified, so there is no need to
duplicate them.
2014-11-06 17:39:13 +02:00
Lukasz Rymanowski
6d957b0aa2 unit/test-hfp: Test for skip hfp_context field
This patch adds test:
/hfp_hf/test_context_skip_field
2014-11-05 08:46:28 +01:00
Lukasz Rymanowski
4e5ce5de4d unit/hfp: Add test for +CME ERROR: response 2014-11-05 08:46:28 +01:00
Lukasz Rymanowski
e733365a41 unit/hfp: Add unit tests for parsing hfp_context
This patch adds:
/hfp/test_hf_context_parser_1
/hfp/test_hf_context_parser_2
2014-11-05 08:46:28 +01:00
Lukasz Rymanowski
6fc38e1508 shared/hfp: Add handling +CME ERROR to parser 2014-11-05 08:46:28 +01:00
Lukasz Rymanowski
383d42f576 shared/hfp: Rename functions operating on context 2014-11-05 08:46:28 +01:00
Lukasz Rymanowski
ca2337dd03 shared/hfp: Rename hfp_hf_result to common hfp_context 2014-11-05 08:46:28 +01:00
Lukasz Rymanowski
55f8a4f4bd shared/hfp: Rename hfp_gw_result to hfp_context
hfp_context seems to be better name for data we get in the result of HFP
GW. Especially that we want to use same for HFP HF response data.
2014-11-05 08:46:27 +01:00
Michael Janssen
46d35351cc unit/gattrib: Only init log on --verbose 2014-11-03 17:17:12 +02:00
Michael Janssen
90a8d80f8f unit/gattrib: Respond to the request PDU. 2014-11-03 17:17:11 +02:00
Michael Janssen
2373a2bd53 unit/gattrib: Check expected PDUs were delivered
Check that the PDUs that we expect to receive when
registering for events have been delivered.
2014-11-03 17:17:10 +02:00
Michael Janssen
84be78a05b attrib: Add unit tests for g_attrib_register 2014-11-03 17:17:09 +02:00
Michael Janssen
ee1d6fe79d Add unit tests for gattrib
This will ensure that the API behavior of gattrib is preserved.
2014-11-03 17:17:07 +02:00
Marcin Kraglak
6dccd4cc35 unit/test-gatt: Add TP/GAD/CL/BV-04-C test
Verify that a Generic Attribute Profile client
can discover characteristic declarations within
a specified service definition.
2014-10-31 16:02:22 +02:00
Marcin Kraglak
463d14ef78 unit/test-gatt: Add TP/GAD/CL/BV-03-C test
Verify that a Generic Attribute Profile client
can find include service declarations within
a specified service definition on a server.
2014-10-31 16:02:22 +02:00
Marcin Kraglak
f6917cb1ae unit/test-gatt: Add TP/GAD/CL/BV-02-C-2 test
Verify that a Generic Attribute Profile client
can discover Primary Services selected by service
using 128-bit UUID.
2014-10-31 16:02:21 +02:00
Marcin Kraglak
b5a0b3bf06 unit/test-gatt: Add TP/GAD/CL/BV-02-C-1 test
Verify that a Generic Attribute Profile client
can discover Primary Services selected by service
using 16-bit UUID.
2014-10-31 16:02:21 +02:00
Marcin Kraglak
1a1f1b50a5 unit/test-gatt: Add TP/GAD/CL/BV-01-C test
Verify that a Generic Attribute Profile client discovers
Primary Services in a GATT server.
2014-10-31 16:02:21 +02:00
Andrei Emeltchenko
e26d17b5b7 unit/test-hfp: Fix wrong check 2014-10-30 10:27:20 +01:00
Lukasz Rymanowski
ee91c14309 unit/test-hfp: Add some robustness tests for HFP HF
This patch adds folowing tests:
/hfp/test_hf_corrupted_1
/hfp/test_hf_corrupted_2
/hfp/test_hf_empty
/hfp/test_hf_unknown
2014-10-28 08:12:24 +01:00
Lukasz Rymanowski
de48f9aeac unit/test-hfp: Add tests for unsolicited results for HFP HF
This patch adds three test case:
/hfp_hf/test_unsolicited_1
/hfp_hf/test_unsolicited_2
/hfp_hf/test_unsolicited_3
2014-10-28 08:12:24 +01:00
Lukasz Rymanowski
68f7cd5aea unit/test-hfp: Add send command tests for HFP HF
This patch adds following tests:
/hfp_hf/test_send_command_1
/hfp_hf/test_send_command_2
2014-10-28 08:12:24 +01:00
Lukasz Rymanowski
1ad358e0af unit/test-hfp: Add init test for HFP HF
This patch adds basic infrastruction for HFP HF test plus
init test.

It also moves send_pdu function in the file so it can be used by
test_hf_handler
2014-10-28 08:12:24 +01:00
Lukasz Rymanowski
fff97d8086 unit/test-hfp: Provide test_handler function via struct data
This patch allows us to use user defined test handler depends on needs.
Will use it in following patches which implements tests for HFP HF.
2014-10-28 08:12:24 +01:00
Luiz Augusto von Dentz
3883c4a6a0 unit/test-avrcp: Add /TP/PTH/BV-02-C test
Verify that when a button to send a PASS THROUGH command is held
down the CT continues to issue button presses every 2 seconds until the
button is released.
2014-10-24 17:40:11 +03:00
Luiz Augusto von Dentz
ea331a25f8 unit/test-avrcp: Add /TP/PTH/BV-01-C test
Verify the state flag in the PASS THROUGH command is correctly set to
convey the button action.
2014-10-24 17:30:50 +03:00
Luiz Augusto von Dentz
9714e1eccb unit/test-avrcp: Add TP/VLH/BI-04-C test
Verify the behavior of the CT receiving a SetAbsoluteVolume Response
with the top bit (bit 7) set.
2014-10-17 09:43:57 +02:00
Luiz Augusto von Dentz
ddfabb3c8b unit/test-avrcp: Add TP/VLH/BI-03-C test
Verify the behavior of the CT receiving a SetAbsoluteVolume Response
with the top bit (bit 7) set.
2014-10-16 15:38:44 +02:00
Luiz Augusto von Dentz
e8daf2fd3f unit/test-avrcp: Add TP/VLH/BV-04-C test
Verify the NotifyVolumeChange response issued by the TG.
2014-10-16 15:38:44 +02:00
Luiz Augusto von Dentz
46cdc54016 unit/test-avrcp: Add TP/VLH/BV-03-C test
Verify the NotifyVolumeChange command issued by the CT.
2014-10-16 15:38:44 +02:00
Luiz Augusto von Dentz
28cb708fa7 unit/test-avrcp: Add /TP/MCN/NP/BV-07-C test
Verify the NowPlayingContentChanged Notification issued by the TG.
2014-10-16 15:38:43 +02:00
Luiz Augusto von Dentz
23f5b907fa android/avrcp-lib: Rework callback return
This allow callbacks to return 0 instead of -EAGAIN when responding
asynchronously which is more consistent since it is not an error.
2014-10-16 15:38:43 +02:00
Luiz Augusto von Dentz
68a8abdafa android/avrcp-lib: Add status parameter
This adds status parameter for functions generating browsing reponses
as it may not be possible to respond synchronously using the return of
the callback while processing the request.
2014-10-16 15:38:43 +02:00
Luiz Augusto von Dentz
fd6dc924ab unit/test-avrcp: Add /TP/MCN/CB/BI-05-C test
Verify the TG issues an error when receiving a command for an invalid
UID_counter.
2014-10-10 17:00:42 +03:00
Luiz Augusto von Dentz
48381ae908 unit/test-avrcp: Fix test /TP/MCN/CB/BV-11-C
Verify the TG increments the UID_counter and sends a
UIDSChangedNotification when updates on existing UIDs occur if the
TG is database aware.
2014-10-10 17:00:42 +03:00
Luiz Augusto von Dentz
b4bfff7ef9 unit/test-avrcp: Fix test /TP/MCN/CB/BV-10-C
Verify the initial value of the UID_counter if the TG is a database
aware player.
2014-10-10 17:00:42 +03:00
Luiz Augusto von Dentz
20a8883404 unit/test-avrcp: Fix test /TP/MCN/CB/BV-09-C
Verify the initial value of the UID_counter if the TG is a database
unaware player.
2014-10-10 17:00:42 +03:00
Luiz Augusto von Dentz
9f988cf8c0 unit/test-avrcp: Fix test /TP/MCN/CB/BV-03-C
The test is to verify GetFolderItems after SetBrowsedPlayer and
SetAddressedPlayer have been sent.
2014-10-10 17:00:42 +03:00
Luiz Augusto von Dentz
8c923a75c8 unit/test-avrcp: Add /TP/MPS/BI-02-C test
Verify the SetBrowsedPlayer response issued by the TG when an invalid
player is requested.
2014-10-10 17:00:42 +03:00
Luiz Augusto von Dentz
13df1346c7 unit/test-avrcp: Add /TP/MPS/BI-01-C test
Verify the SetAddressedPlayer response issued by the TG when an
invalid player is requested.
2014-10-10 17:00:42 +03:00
Luiz Augusto von Dentz
8a8448b4c0 unit/test-avrcp: Add /TP/MPS/BV-07-C test
Verify the AvailablePlayersChanged Notification issued by the TG.
2014-10-10 17:00:41 +03:00
Luiz Augusto von Dentz
87ff4f1fbf unit/test-avrcp: Add /TP/MPS/BV-06-C test
Verify the PlayerFeatureBitmask issued by the TG.
2014-10-10 17:00:41 +03:00
Luiz Augusto von Dentz
95fd70a026 unit/test-avrcp: Add /TP/MPS/BV-05-C test
Verify the AddressedPlayerChanged Notification issued by the TG and the
procedure associated to this.
2014-10-10 17:00:41 +03:00
Luiz Augusto von Dentz
c26580e442 unit/test-avrcp: Add /TP/MPS/BV-04-C test
Verify the SetBrowsedPlayer response issued by the TG.
2014-10-10 17:00:41 +03:00
Luiz Augusto von Dentz
accd43d05b unit/test-avrcp: Fix not checking PDU type
It is an error if a control PDU is received over browsing channel or
vice versa.
2014-10-08 14:53:00 +03:00
Luiz Augusto von Dentz
372f97bfe6 unit/test-avrcp: Fix PDU type
Browsing command should use brs_pdu to define its PDU.
2014-10-07 16:46:51 +03:00
Luiz Augusto von Dentz
386a3a0a89 android/avrcp-lib: Add RegisterNotification structs 2014-10-06 16:01:50 +03:00
Luiz Augusto von Dentz
bbbbae44e3 android/avrcp-lib: Add SetPlayerApplicationSettingValue structs 2014-10-06 16:01:49 +03:00
Luiz Augusto von Dentz
a7264f9604 unit/test-gatt: Add TP/GAC/CL/BV-01-C test
Verify that a Generic Attribute Profile client can generate an
Exchange MTU Request command.
2014-10-03 10:28:43 +03:00
Luiz Augusto von Dentz
3053eb7a0a unit/test-queue: Fix memory leak
This fixes the following memory leak:

32 bytes in 1 blocks are definitely lost in loss record 20 of 35
   at 0x4C291D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x400DC2: queue_new (queue.c:65)
   by 0x400AA5: test_foreach_remove_all (test-queue.c:92)
   by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x40083E: main (test-queue.c:109)
2014-06-27 14:02:25 +03:00
Szymon Janc
ee9dc0d40d unit/test-hfp: Add test for parsing empty string
Test if parser is properly handling single '\r'.
2014-06-10 11:38:46 +02:00
Marcel Holtmann
9423547294 unit: The crypto create and cleanup functions are not test cases 2014-06-06 16:44:39 +02:00
Luiz Augusto von Dentz
1573ebb852 unit/test-avrcp: Add /TP/RCR/BV-04-C test
To verify the TG can accept abort fragmentation correctly.
2014-06-06 11:17:07 +03:00
Luiz Augusto von Dentz
ae65964e6c unit/test-avrcp: Add /TP/RCR/BV-02-C test
To verify that the TG can handle fragmentation correctly.
2014-06-06 11:17:07 +03:00
Lukasz Rymanowski
ff781eea58 unit/crypto: Update unit test vectors after changes in singing process 2014-05-30 13:26:47 +03:00
Lukasz Rymanowski
87f79a9c7d shared/crypto: Extend bt_crypto_sign_att with sign counter
Sign counter is use in two places during att signing:
1) Shall be concatenated with message to be sign as specified in BT spec
4.1, Vol[3], Part H, chapter 2.4.5

2) Shall be a part of signature send in the att packet as specified in
BT spec 4.1 Vol[3], Part C, chapter 10.4.1

With this patch, bt_crypto_sign_att returns signature as specified in 2)

This patch also updates unit tests so now it uses sign counter 0. Note
that test vectors no longer match that one from  NIST Special
Publication 800-38B
2014-05-26 10:27:21 +02:00
Luiz Augusto von Dentz
00d4b9d89f unit/test-uhid: Add /uhid/event/feature test 2014-05-23 16:40:29 +03:00
Luiz Augusto von Dentz
8f18444f6f unit/test-uhid: Add /uhid/event/output test 2014-05-23 16:40:29 +03:00
Luiz Augusto von Dentz
66353cb5ee unit/test-uhid: Add /uhid/command/input test 2014-05-23 16:40:29 +03:00
Luiz Augusto von Dentz
8dd8057204 unit/test-uhid: Add /uhid/command/feature_answer test 2014-05-23 16:40:29 +03:00
Luiz Augusto von Dentz
87779c5572 unit/test-uhid: Add /uhid/command/destroy test 2014-05-23 16:40:29 +03:00
Luiz Augusto von Dentz
6e241c877b unit/test-uhid: Add /uhid/command/create test 2014-05-23 16:40:29 +03:00
Luiz Augusto von Dentz
632617bc86 shared/uhid: Add initial API 2014-05-23 16:40:29 +03:00
Luiz Augusto von Dentz
d03c4da20c unit/test-queue: Add /queue/foreach_remove_all test
This tests queue_remove_all from queue_foreach callback.
2014-05-23 16:40:29 +03:00
Luiz Augusto von Dentz
661d845b71 unit/test-queue: Add /queue/foreach_destroy test
This tests queue_destroy from queue_foreach callback.
2014-05-23 16:40:29 +03:00
Lukasz Rymanowski
a257810878 unit: Add test case for AES-CMAC-128
Test vectors taken from the NIST Special Publication 800-38B
(http://csrc.nist.gov/publications/PubsSPs.html)
2014-05-20 14:54:30 +03:00
Luiz Augusto von Dentz
d5a247053d unit/test-avrcp: Add /TP/VLH/BI-02-C test
To verify the behavior of the TG receiving a SetAbsoluteVolume command
with the top level bit set.
2014-05-19 16:12:54 +03:00
Luiz Augusto von Dentz
d4a3119903 unit/test-avrcp: Add /TP/VLH/BI-01-C test
To verify the behavior of the TG receiving an invalid SetAbsoluteVolume
command.
2014-05-19 16:12:54 +03:00
Luiz Augusto von Dentz
cf52741577 unit/test-avrcp: Add /TP/VLH/BV-02-C test
To verify the behavior of the TG receiving a valid SetAbsoluteVolume
command.
2014-05-19 16:12:53 +03:00
Luiz Augusto von Dentz
b6bc216fd7 unit/test-avrcp: Add /TP/VLH/BV-01-C test
To verify the SetAbsoluteVolume command issued by the CT.
2014-05-19 16:12:53 +03:00
Luiz Augusto von Dentz
f0af92e9a9 unit/avrcp-lib: Fix avrcp_get_play_status_rsp
GetPlayStatus PDU start with duration followed by position not the other
way around.
2014-05-16 10:41:40 +03:00
Luiz Augusto von Dentz
aadd3c8c7d unit/test-avrcp: Add /TP/PAS/BV-07-C test
To verify the player application setting value text command issued from
the CT.
2014-05-07 19:35:53 +03:00
Luiz Augusto von Dentz
1bd71fb183 unit/test-avrcp: Add /TP/PAS/BV-05-C test
To verify the List Player Application Setting Values command issued from
the CT.
2014-05-07 19:35:35 +03:00
Luiz Augusto von Dentz
1dd3ac5875 android/avrcp-lib: Fix avrcp_get_player_attribute_text
This fixes avrcp_get_player_attribute_text generating incorrect PDUs.
2014-05-05 15:40:30 +03:00
Luiz Augusto von Dentz
db89f55e01 android/avrcp: Add avrcp_set_player_value_rsp function
This function can be used to generate SetPlayerValue responses.
2014-04-30 15:45:13 +03:00
Luiz Augusto von Dentz
cf9bd782b2 unit/test-avrcp: Add /TP/MCN/NP/BI-02-C test
To verify the AddToNowPlaying response issued by the TG when an invalid
UID is requested.
2014-04-25 15:05:26 +03:00
Luiz Augusto von Dentz
6ed86d848b unit/test-avrcp: Add /TP/MCN/NP/BV-04-C test
To verify the AddToNowPlaying response issued by the TG.
2014-04-25 15:05:26 +03:00
Luiz Augusto von Dentz
f9753eb440 unit/test-avrcp: Add /TP/MCN/NP/BV-03-C test
To verify the AddToNowPlaying command issued by the CT.
2014-04-25 15:05:26 +03:00
Luiz Augusto von Dentz
3abf926b0d unit/test-avrcp: Add /TP/MCN/SRC/BV-02-C test
To verify the Search response issued by the TG.
2014-04-25 15:05:26 +03:00
Luiz Augusto von Dentz
1bc6d6c1f5 unit/test-avrcp: Add /TP/MCN/NP/BI-01-C test
To verify the PlayItem response issued by the TG when an invalid UID is
requested.
2014-04-25 15:05:25 +03:00
Luiz Augusto von Dentz
c66ebb3fe4 unit/test-avrcp: Add /TP/MCN/NP/BV-02-C test
To verify the PlayItem response issued by the TG.
2014-04-25 15:05:25 +03:00
Luiz Augusto von Dentz
b8886c3f3a unit/test-avrcp: Add /TP/MCN/NP/BV-01-C test
To verify the PlayItem command issued by the CT.
2014-04-25 15:05:25 +03:00
Luiz Augusto von Dentz
1b98ed9368 unit/test-avrcp: Add /TP/MCN/NP/BV-09-C test
To verify the GetItemAttributes response issued by the TG on a Media Item
in the NowPlaying folder.
2014-04-25 15:05:25 +03:00
Luiz Augusto von Dentz
64864f7b68 unit/test-avrcp: Add /TP/MCN/NP/BV-08-C test
To verify the GetItemAttributes command issued by the CT on a Media Item
in the NowPlaying folder.
2014-04-25 15:05:25 +03:00
Luiz Augusto von Dentz
de860efe25 unit/test-avrcp: Add /TP/MCN/SRC/BV-06-C test
To verify the GetItemAttributes response issued by the TG on a Media Item
in the Search folder other than the currently playing one (UID 0x0).
2014-04-25 15:05:25 +03:00
Luiz Augusto von Dentz
7252ff6c7f unit/test-avrcp: Add /TP/MCN/CB/BV-08-C test
To verify the GetItemAttributes response issued by the TG on a Media Item
in the Media Player Virtual Filesystem other than the currently playing
one (UID 0x0).
2014-04-25 15:05:25 +03:00
Luiz Augusto von Dentz
58565fb89b unit/test-avrcp: Add /TP/MCN/CB/BI-04-C test
To verify the ChangePath response issued by the TG when an invalid Folder
UID is requested.
2014-04-25 15:05:24 +03:00