From 7c44bc4e7b4901fdf057f82d9cf452cb6d72ea69 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 6 Jan 2013 18:50:12 -0800 Subject: [PATCH] unit: Add SDP Service Search Attribute Requests with an empty response --- unit/test-sdp.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/unit/test-sdp.c b/unit/test-sdp.c index b8ebb2bd8..52ec314c8 100644 --- a/unit/test-sdp.c +++ b/unit/test-sdp.c @@ -1377,6 +1377,87 @@ int main(int argc, char *argv[]) 0x00), raw_pdu(0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04)); + /* + * Service Search Attribute Request + * + * Verify the correct behaviour of the IUT when searching + * for non-existing Service, existing Attribute using + * ServiceSearchAttributeRequest. + */ + define_ssa("BV-01-C/UUID-16", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x0d, 0x35, 0x03, 0x19, + 0xff, 0xff, 0x00, 0x0a, 0x35, 0x03, 0x09, 0x00, + 0x01, 0x00), + raw_pdu(0x07, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x35, + 0x00, 0x00)); + define_ssa("BV-01-C/UUID-32", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x0f, 0x35, 0x05, 0x1a, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x0a, 0x35, 0x03, + 0x09, 0x00, 0x01, 0x00), + raw_pdu(0x07, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x35, + 0x00, 0x00)); + define_ssa("BV-01-C/UUID-128", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x1b, 0x35, 0x11, 0x1c, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x0a, 0x35, 0x03, 0x09, 0x00, 0x01, 0x00), + raw_pdu(0x07, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x35, + 0x00, 0x00)); + + /* + * Service Search Attribute Request + * + * Verify the correct behaviour of the IUT when searching + * for existing Service, non-existing Attribute using + * ServiceSearchAttributeRequest. + */ + define_ssa("BV-02-C/UUID-16", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x0d, 0x35, 0x03, 0x19, + 0x11, 0x05, 0x00, 0x0a, 0x35, 0x03, 0x09, 0xff, + 0xff, 0x00), + raw_pdu(0x07, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x35, + 0x00, 0x00)); + define_ssa("BV-02-C/UUID-32", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x0f, 0x35, 0x05, 0x1a, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x0a, 0x35, 0x03, + 0x09, 0xff, 0xff, 0x00), + raw_pdu(0x07, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x35, + 0x00, 0x00)); + define_ssa("BV-02-C/UUID-128", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x1b, 0x35, 0x11, 0x1c, + 0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb, + 0x00, 0x0a, 0x35, 0x03, 0x09, 0xff, 0xff, 0x00), + raw_pdu(0x07, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x35, + 0x00, 0x00)); + + /* + * Service Search Attribute Request + * + * Verify the correct behaviour of the IUT when searching + * for non-existing Service, non-existing Attribute using + * ServiceSearchAttributeRequest. + */ + define_ssa("BV-03-C/UUID-16", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x0d, 0x35, 0x03, 0x19, + 0xff, 0xff, 0x00, 0x0a, 0x35, 0x03, 0x09, 0xff, + 0xff, 0x00), + raw_pdu(0x07, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x35, + 0x00, 0x00)); + define_ssa("BV-03-C/UUID-32", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x0f, 0x35, 0x05, 0x1a, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x0a, 0x35, 0x03, + 0x09, 0xff, 0xff, 0x00), + raw_pdu(0x07, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x35, + 0x00, 0x00)); + define_ssa("BV-03-C/UUID-128", + raw_pdu(0x06, 0x00, 0x01, 0x00, 0x1b, 0x35, 0x11, 0x1c, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x0a, 0x35, 0x03, 0x09, 0xff, 0xff, 0x00), + raw_pdu(0x07, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x35, + 0x00, 0x00)); + /* * Service Search Attribute Request * -- 2.47.3