Diff between eb375e8d3c5e48e02fad688e331e861438a109eb and c5e34a8093343d5d27a00de85239c6db18d5dee6

Changed Files

File Additions Deletions Status
unit/test-gatt.c +21 -0 modified

Full Patch

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index 72cfbf6..8d5f3b3 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -160,6 +160,12 @@ static bt_uuid_t uuid_128 = {
 				0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb}
 };
 
+static bt_uuid_t uuid_char_128 = {
+	.type = BT_UUID128,
+	.value.u128.data = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+			0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}
+};
+
 const bt_gatt_service_t service_1 = {
 	.primary = true,
 	.start_handle = 0x0001,
@@ -807,5 +813,20 @@ int main(int argc, char *argv[])
 			raw_pdu(0x08, 0x0b, 0x00, 0xff, 0xff, 0x0d, 0x2a),
 			raw_pdu(0x01, 0x08, 0x0b, 0x00, 0x0a));
 
+	define_test_att("/TP/GAR/CL/BV-03-C-2", test_read_by_type,
+			&uuid_char_128, &test_read_by_type_1,
+			raw_pdu(0x02, 0x00, 0x02),
+			raw_pdu(0x03, 0x00, 0x02),
+			raw_pdu(0x08, 0x01, 0x00, 0xff, 0xff, 0x0f, 0x0e, 0x0d,
+					0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
+					0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
+					0x00),
+			raw_pdu(0x09, 0x05, 0x0a, 0x00, 0x01, 0x02, 0x03),
+			raw_pdu(0x08, 0x0b, 0x00, 0xff, 0xff, 0x0f, 0x0e, 0x0d,
+					0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
+					0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
+					0x00),
+			raw_pdu(0x01, 0x08, 0x0b, 0x00, 0x0a));
+
 	return g_test_run();
 }