Verify that a Generic Attribute Profile server can support discovery of all particular Primary Services selected by service UUID, using 16-bit UUIDs, and using 128-bit UUIDs where supported. 128-bit tests will be added once the larger databases with 128-bit UUIDs are added. --- unit/test-gatt.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/unit/test-gatt.c b/unit/test-gatt.c index 6e075f6..fbccb18 100644 --- a/unit/test-gatt.c +++ b/unit/test-gatt.c @@ -1509,6 +1509,63 @@ int main(int argc, char *argv[]) 0x18, 0x00, 0x00), raw_pdu(0x01, 0x06, 0x18, 0x00, 0x0a)); + define_test_server("/TP/GAD/SR/BV-02-C/exists-16/small", test_server, + ts_small_db, NULL, + raw_pdu(0x03, 0x00, 0x02), + raw_pdu(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0x00, + 0x18), + raw_pdu(0x07, 0x10, 0xf0, 0x17, 0xf0), + raw_pdu(0x06, 0x18, 0xf0, 0xff, 0xff, 0x00, 0x28, 0x00, + 0x18), + raw_pdu(0x01, 0x06, 0x18, 0xf0, 0x0a)); + + define_test_server("/TP/GAD/SR/BV-02-C/exists-16/large-1", test_server, + ts_large_db_1, NULL, + raw_pdu(0x03, 0x00, 0x02), + raw_pdu(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0x0b, + 0xa0), + raw_pdu(0x07, 0x30, 0x00, 0x32, 0x00, 0x50, 0x00, 0x52, + 0x00, 0x60, 0x00, 0x6b, 0x00, 0x70, 0x00, 0x76, + 0x00, 0x80, 0x00, 0x85, 0x00), + raw_pdu(0x06, 0x86, 0x00, 0xff, 0xff, 0x00, 0x28, 0x0b, + 0xa0), + raw_pdu(0x01, 0x06, 0x86, 0x00, 0x0a)); + + define_test_server("/TP/GAD/SR/BV-02-C/missing-16/small", test_server, + ts_small_db, NULL, + raw_pdu(0x03, 0x00, 0x02), + raw_pdu(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0x01, + 0x18), + raw_pdu(0x01, 0x06, 0x01, 0x00, 0x0a)); + + define_test_server("/TP/GAD/SR/BV-02-C/missing-16/large-1", test_server, + ts_large_db_1, NULL, + raw_pdu(0x03, 0x00, 0x02), + raw_pdu(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0x0f, + 0xf0), + raw_pdu(0x01, 0x06, 0x01, 0x00, 0x0a)); + + define_test_server("/TP/GAD/SR/BV-02-C/exists-128/large-1", test_server, + ts_large_db_1, NULL, + raw_pdu(0x03, 0x00, 0x02), + raw_pdu(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0xef, + 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0xa0, 0x00, 0x00), + raw_pdu(0x07, 0x90, 0x00, 0x96, 0x00, 0xc0, 0x00, 0xdd, + 0x00), + raw_pdu(0x06, 0xde, 0x00, 0xff, 0xff, 0x00, 0x28, 0xef, + 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0xa0, 0x00, 0x00), + raw_pdu(0x01, 0x06, 0xde, 0x00, 0x0a)); + + define_test_server("/TP/GAD/SR/BV-02-C/missing-128/large-1", + test_server, ts_large_db_1, NULL, + raw_pdu(0x03, 0x00, 0x02), + raw_pdu(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0xff, + 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0xa0, 0x00, 0x00), + raw_pdu(0x01, 0x06, 0x01, 0x00, 0x0a)); + define_test_att("/TP/GAD/CL/BV-03-C", test_search_included, NULL, NULL, MTU_EXCHANGE_CLIENT_PDUS, -- 2.2.0.rc0.207.ga3a616c -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html