From 48381ae908df59fd17addd4d353d1e6ef268ad1a Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 9 Oct 2014 16:33:11 +0300 Subject: [PATCH] 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. --- unit/test-avrcp.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c index 6fe4e8fea..e77cf9515 100644 --- a/unit/test-avrcp.c +++ b/unit/test-avrcp.c @@ -620,6 +620,13 @@ static int uids_changed(struct avrcp *session, uint8_t transaction, AVRCP_EVENT_UIDS_CHANGED, &counter, sizeof(counter)); + if (!g_str_equal(context->data->test_name, "/TP/MCN/CB/BV-11-C")) + return -EAGAIN; + + avrcp_register_notification_rsp(session, transaction, AVC_CTYPE_CHANGED, + AVRCP_EVENT_UIDS_CHANGED, + &counter, sizeof(counter)); + return -EAGAIN; } @@ -1196,6 +1203,21 @@ int main(int argc, char *argv[]) 0x00, 0x00, 0x03, 0x0c, 0x00, 0x01)); + /* UIDcounter - TG */ + define_test("/TP/MCN/CB/BV-11-C", test_server, + raw_pdu(0x00, 0x11, 0x0e, 0x03, 0x48, 0x00, + 0x00, 0x19, 0x58, AVRCP_REGISTER_NOTIFICATION, + 0x00, 0x00, 0x05, 0x0c, + 0x00, 0x00, 0x00, 0x00), + frg_pdu(0x02, 0x11, 0x0e, AVC_CTYPE_INTERIM, 0x48, 0x00, + 0x00, 0x19, 0x58, AVRCP_REGISTER_NOTIFICATION, + 0x00, 0x00, 0x03, 0x0c, + 0x00, 0x01), + raw_pdu(0x02, 0x11, 0x0e, AVC_CTYPE_CHANGED, 0x48, 0x00, + 0x00, 0x19, 0x58, AVRCP_REGISTER_NOTIFICATION, + 0x00, 0x00, 0x03, 0x0c, + 0x01, 0x00)); + /* GetFolderItems - Virtual FS - TG */ define_test("/TP/MCN/CB/BI-01-C", test_server, brs_pdu(0x00, 0x11, 0x0e, AVRCP_GET_FOLDER_ITEMS, -- 2.47.3