From 323eede9673d5a1ce75cb060dfc028d16d5ddc9d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 6 Jan 2013 14:38:40 -0800 Subject: [PATCH] unit: Add test cases for SDP Service Attribute Requests --- unit/test-sdp.c | 479 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 479 insertions(+) diff --git a/unit/test-sdp.c b/unit/test-sdp.c index 2c55c95a8..59c79994d 100644 --- a/unit/test-sdp.c +++ b/unit/test-sdp.c @@ -839,5 +839,484 @@ int main(int argc, char *argv[]) 0x00), raw_pdu(0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03)); + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with attribute(s). + */ + define_sa("BV-01-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x0a, 0x35, 0x03, 0x09, 0x00, 0x01, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x0a, 0x35, + 0x08, 0x09, 0x00, 0x01, 0x35, 0x03, 0x19, 0x11, + 0x05, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with the existing + * Attribute(s) using ContinuationState. + */ + define_sa("BV-03-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x01, 0x00, 0x0f, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x07, 0x35, 0x06, 0x09, 0x00, 0x00, + 0x09, 0x00, 0x01, 0x00), + raw_pdu_cont(8, 0x05, 0x00, 0x01, 0x00, 0x12, 0x00, 0x07, 0x35, + 0x10, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x08), + raw_pdu_cont(8, 0x04, 0x00, 0x02, 0x00, 0x17, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x07, 0x35, 0x06, 0x09, 0x00, 0x00, + 0x09, 0x00, 0x01, 0x08), + raw_pdu_cont(8, 0x05, 0x00, 0x02, 0x00, 0x12, 0x00, 0x07, 0x01, + 0x00, 0x00, 0x09, 0x00, 0x01, 0x35, 0x08), + raw_pdu_cont(8, 0x04, 0x00, 0x03, 0x00, 0x17, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x07, 0x35, 0x06, 0x09, 0x00, 0x00, + 0x09, 0x00, 0x01, 0x08), + raw_pdu(0x05, 0x00, 0x03, 0x00, 0x07, 0x00, 0x04, 0x03, + 0x19, 0x11, 0x01, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with an + * ServiceID attribute. + */ + define_sa("BV-04-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x19, 0x35, 0x03, 0x09, 0x00, 0x03, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x08, 0x35, + 0x06, 0x09, 0x00, 0x03, 0x19, 0x11, 0x01, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with an + * ProtocolDescriptorList attribute. + */ + define_sa("BV-05-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x01, 0xff, 0xff, 0x35, 0x03, 0x09, 0x00, 0x04, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x1b, 0x00, 0x18, 0x35, + 0x16, 0x09, 0x00, 0x04, 0x35, 0x11, 0x35, 0x03, + 0x19, 0x01, 0x00, 0x35, 0x05, 0x19, 0x00, 0x03, + 0x08, 0x09, 0x35, 0x03, 0x19, 0x00, 0x08, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with the + * ServiceRecordState attribute. + */ + define_sa("BV-06-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x0d, 0x35, 0x03, 0x09, 0x00, 0x02, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x0a, 0x35, + 0x08, 0x09, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x12, + 0x34, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with the + * ServiceInfoTime attribute. + */ + define_sa("BV-07-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x0d, 0x35, 0x03, 0x09, 0x00, 0x07, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x0a, 0x35, + 0x08, 0x09, 0x00, 0x07, 0x0a, 0x00, 0x00, 0xff, + 0xff, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with an + * BrowseGroupList attribute. + */ + define_sa("BV-08-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x0a, 0x35, 0x03, 0x09, 0x00, 0x05, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x0a, 0x35, + 0x08, 0x09, 0x00, 0x05, 0x35, 0x03, 0x19, 0x10, + 0x02, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with an + * LanguageBaseAttributeIdList attribute. + */ + define_sa("BV-09-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x13, 0x35, 0x03, 0x09, 0x00, 0x06, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x13, 0x00, 0x10, 0x35, + 0x0e, 0x09, 0x00, 0x06, 0x35, 0x09, 0x09, 0x65, + 0x6e, 0x09, 0x00, 0x6a, 0x09, 0x01, 0x00, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with an + * ServiceAvailability attribute. + */ + define_sa("BV-10-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x0a, 0x35, 0x03, 0x09, 0x00, 0x08, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x07, 0x35, + 0x05, 0x09, 0x00, 0x08, 0x08, 0xff, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with an + * IconURL attribute. + */ + define_sa("BV-11-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x1f, 0x35, 0x03, 0x09, 0x00, 0x0c, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x1f, 0x00, 0x1c, 0x35, + 0x1a, 0x09, 0x00, 0x0c, 0x45, 0x15, 0x68, 0x74, + 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x62, 0x6c, 0x75, 0x65, 0x7a, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with an + * ServiceName attribute. + */ + define_sa("BV-12-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x16, 0x35, 0x03, 0x09, 0x00, 0x06, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x13, 0x00, 0x10, 0x35, + 0x0e, 0x09, 0x00, 0x06, 0x35, 0x09, 0x09, 0x65, + 0x6e, 0x09, 0x00, 0x6a, 0x09, 0x01, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x15, 0x35, 0x03, 0x09, 0x01, 0x00, + 0x00), + raw_pdu(0x05, 0x00, 0x01, 0x00, 0x15, 0x00, 0x12, 0x35, + 0x10, 0x09, 0x01, 0x00, 0x25, 0x0b, 0x53, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x20, 0x50, 0x6f, 0x72, + 0x74, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with an + * ServiceDescription attribute. + */ + define_sa("BV-13-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x16, 0x35, 0x03, 0x09, 0x00, 0x06, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x13, 0x00, 0x10, 0x35, + 0x0e, 0x09, 0x00, 0x06, 0x35, 0x09, 0x09, 0x65, + 0x6e, 0x09, 0x00, 0x6a, 0x09, 0x01, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x12, 0x35, 0x03, 0x09, 0x01, 0x01, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x12, 0x00, 0x0f, 0x35, + 0x0d, 0x09, 0x01, 0x01, 0x25, 0x08, 0x43, 0x4f, + 0x4d, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with an + * ProviderName attribute. + */ + define_sa("BV-14-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x16, 0x35, 0x03, 0x09, 0x00, 0x06, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x13, 0x00, 0x10, 0x35, + 0x0e, 0x09, 0x00, 0x06, 0x35, 0x09, 0x09, 0x65, + 0x6e, 0x09, 0x00, 0x6a, 0x09, 0x01, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x0f, 0x35, 0x03, 0x09, 0x01, 0x02, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x0f, 0x00, 0x0c, 0x35, + 0x0a, 0x09, 0x01, 0x02, 0x25, 0x05, 0x42, 0x6c, + 0x75, 0x65, 0x5a, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with an + * VersionNumberList attribute. + */ + define_sa("BV-15-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0d, 0x35, 0x03, 0x09, 0x02, 0x00, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x0a, 0x35, + 0x08, 0x09, 0x02, 0x00, 0x35, 0x03, 0x09, 0x01, + 0x00, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with the + * ServiceDatabaseState attribute. + */ + define_sa("BV-16-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0d, 0x35, 0x03, 0x09, 0x02, 0x01, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x0a, 0x35, + 0x08, 0x09, 0x02, 0x01, 0x0a, 0x49, 0x6f, 0x06, + 0x54, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with the + * BluetoothProfileDescriptorList attribute. + */ + define_sa("BV-17-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x0f, 0x35, 0x03, 0x09, 0x00, 0x09, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x12, 0x00, 0x0f, 0x35, + 0x0d, 0x09, 0x00, 0x09, 0x35, 0x08, 0x35, 0x06, + 0x19, 0x11, 0x05, 0x09, 0x01, 0x00, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with the + * DocumentationURL attribute. + */ + define_sa("BV-18-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x1f, 0x35, 0x03, 0x09, 0x00, 0x0a, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x1f, 0x00, 0x1c, 0x35, + 0x1a, 0x09, 0x00, 0x0a, 0x45, 0x15, 0x68, 0x74, + 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x62, 0x6c, 0x75, 0x65, 0x7a, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with the + * ClientExecutableURL attribute. + */ + define_sa("BV-19-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x1f, 0x35, 0x03, 0x09, 0x00, 0x0b, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x1f, 0x00, 0x1c, 0x35, + 0x1a, 0x09, 0x00, 0x0b, 0x45, 0x15, 0x68, 0x74, + 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x62, 0x6c, 0x75, 0x65, 0x7a, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x00)); + + /* + * Service Attribute Request + * + * Verify the correct behaviour of the IUT when searching + * for non-existing Attribute. + */ + define_sa("BV-20-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x07, 0x35, 0x03, 0x09, 0xff, 0xff, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x05, 0x00, 0x02, 0x35, + 0x00, 0x00)); + + /* + * Service Attribute Request + * + * Verify that the IUT is able to respond with an + * AdditionalProtocolDescriptorList attribute. + */ + define_sa("BV-21-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x24, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x02, 0x00), + raw_pdu(0x04, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, + 0x02, 0xff, 0xff, 0x35, 0x03, 0x09, 0x00, 0x0d, + 0x00), + raw_pdu(0x05, 0x00, 0x02, 0x00, 0x19, 0x00, 0x16, 0x35, + 0x14, 0x09, 0x00, 0x0d, 0x35, 0x0f, 0x35, 0x0d, + 0x35, 0x06, 0x19, 0x01, 0x00, 0x09, 0x00, 0x13, + 0x35, 0x03, 0x19, 0x00, 0x11, 0x00)); + + /* + * Service Attribute Request + * + * Verify the correct behaviour of the IUT when searching + * for existing Attribute, using invalid ServiceRecordHandle. + */ + define_sa("BI-01-C", + raw_pdu(0x04, 0x00, 0x01, 0x00, 0x0c, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x07, 0x35, 0x03, 0x09, 0x00, 0x01, + 0x00), + raw_pdu(0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x02)); + + /* + * Service Attribute Request + * + * Verify the correct behaviour of the IUT when searching + * for existing Attribute, using invalid request syntax. + */ + define_sa("BI-02-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x01, 0x00, + 0x00, 0x35, 0x03, 0x09, 0x00, 0x01, 0x00), + raw_pdu(0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03)); + + /* + * Service Attribute Request + * + * Verify the correct behaviour of the IUT when searching + * for existing Attribute, using invalid PDU-Size. + */ + define_sa("BI-03-C", + raw_pdu(0x02, 0x00, 0x01, 0x00, 0x16, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x01, 0x00), + raw_pdu(0x03, 0x00, 0x01, 0x00, 0x09, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00), + raw_pdu(0x04, 0x00, 0x01, 0x00, 0x11, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x07, 0x35, 0x03, 0x09, 0x00, 0x01, + 0x00), + raw_pdu(0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04)); + return g_test_run(); } -- 2.47.3