Return-Path: From: Michael Janssen To: linux-bluetooth@vger.kernel.org Cc: Michael Janssen Subject: [PATCH BlueZ v2 06/12] unit/gatt: Add /TP/GAD/SR/BV-02-C test Date: Mon, 5 Jan 2015 13:32:48 -0800 Message-Id: <1420493574-37305-7-git-send-email-jamuraa@chromium.org> In-Reply-To: <1420493574-37305-1-git-send-email-jamuraa@chromium.org> References: <1420493574-37305-1-git-send-email-jamuraa@chromium.org> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: 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 632609f..12e84da 100644 --- a/unit/test-gatt.c +++ b/unit/test-gatt.c @@ -1525,6 +1525,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