mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-21 18:04:00 +08:00
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.
This commit is contained in:
parent
a3e1b45a16
commit
a9fa00b549
@ -558,6 +558,9 @@ static int get_folder_items(struct avrcp *session, uint8_t transaction,
|
||||
if (g_str_equal(context->data->test_name, "/TP/MCN/CB/BI-02-C"))
|
||||
return -ERANGE;
|
||||
|
||||
if (start > 1)
|
||||
return -ERANGE;
|
||||
|
||||
avrcp_get_folder_items_rsp(session, transaction, 0xabcd, 0, NULL, NULL,
|
||||
NULL);
|
||||
|
||||
@ -790,6 +793,16 @@ int main(int argc, char *argv[])
|
||||
brs_pdu(0x02, 0x11, 0x0e, AVRCP_GET_FOLDER_ITEMS,
|
||||
0x00, 0x01, 0x0b));
|
||||
|
||||
/* GetFolderItems - Virtual FS - TG */
|
||||
define_test("/TP/MCN/CB/BI-03-C", test_server,
|
||||
brs_pdu(0x00, 0x11, 0x0e, AVRCP_GET_FOLDER_ITEMS,
|
||||
0x00, 0x0a, AVRCP_MEDIA_PLAYER_VFS,
|
||||
0x00, 0x00, 0x00, 0x02, /* start */
|
||||
0x00, 0x00, 0x00, 0x03, /* end */
|
||||
0x00),
|
||||
brs_pdu(0x02, 0x11, 0x0e, AVRCP_GET_FOLDER_ITEMS,
|
||||
0x00, 0x01, 0x0b));
|
||||
|
||||
/* Media Content Navigation Commands and Notifications for Search */
|
||||
|
||||
/* Search - CT */
|
||||
|
Loading…
Reference in New Issue
Block a user