Commit Graph

446 Commits

Author SHA1 Message Date
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
Luiz Augusto von Dentz
b570ed72ef unit/test-avrcp: Add /TP/MCN/CB/BV-06-C test
To verify the ChangePath response issued by the TG when the Direction is
FolderUp.
2014-04-25 15:05:24 +03:00
Luiz Augusto von Dentz
c63e06da65 unit/test-avrcp: Add /TP/MCN/CB/BV-05-C test
To verify the ChangePath response issued by the TG.
2014-04-25 15:05:24 +03:00
Luiz Augusto von Dentz
4b904214c8 unit/test-avrcp: Add /TP/MCN/NP/BV-06-C test
To verify the GetFolderItems response for the NowPlaying Folder issued by
the TG.
2014-04-25 15:05:24 +03:00
Luiz Augusto von Dentz
7a966998a0 unit/test-avrcp: Add /TP/MCN/NP/BV-05-C test
To verify the GetFolderItems command issued by the CT on the NowPlaying
folder.
2014-04-25 15:05:24 +03:00
Luiz Augusto von Dentz
edca3cd01a unit/test-avrcp: Add /TP/MCN/SRC/BV-04-C test
To verify the GetFolderItems response for the Search Folder issued by
the TG.
2014-04-25 15:05:24 +03:00
Luiz Augusto von Dentz
a9fa00b549 unit/test-avrcp: Add /TP/MCN/CB/BI-03-C test
To verify the GetFolderItems response issued by the TG when the command
contains invalid parameters accessing items beyond the end of a folder.
2014-04-25 15:05:24 +03:00
Luiz Augusto von Dentz
a3e1b45a16 unit/test-avrcp: Add /TP/MCN/CB/BI-02-C test
To verify the GetFolderItems response issued by the TG for an empty
folder when the command contains invalid parameters.
2014-04-25 15:05:24 +03:00
Luiz Augusto von Dentz
60a701c918 unit/test-avrcp: Add /TP/MCN/CB/BI-01-C test
To verify the GetFolderItems response issued by the TG when the command
contains invalid parameters.
2014-04-25 15:05:23 +03:00
Luiz Augusto von Dentz
f18bdc7583 unit/test-avrcp: Add /TP/MCN/CB/BV-02-C test
To verify the GetFolderItems response issued by the TG for a folder.
2014-04-25 15:05:23 +03:00
Luiz Augusto von Dentz
1acdfa5274 unit/test-avrcp: Add /TP/MPS/BV-09-C test
Verify the GetFolderItems response for the Media Player List issued by
the TG.
2014-04-25 15:05:23 +03:00
Luiz Augusto von Dentz
f59732aefc unit/test-avrcp: Add /TP/INV/BI-02-C test
To verify the General Reject Response issued by the TG.
2014-04-25 15:05:23 +03:00
Szymon Janc
166ef636d7 unit: Fix removing invalid source in test-hfp
Since GLib 2.39 calling g_source_remove on already removed source
is causing critical warning. This was causing unit/test-hfp to
fail when running with GLib 2.40.

./unit/test-hfp
/hfp/test_init:
(./unit/test-hfp:28878): GLib-CRITICAL **: Source ID 1 was not found
    when attempting to remove it
Trace/breakpoint trap
2014-04-25 11:12:58 +03:00