Enable check-TESTS using %check section in bluez 39/174139/5
authorAtul Rai <a.rai@samsung.com>
Wed, 28 Mar 2018 10:58:55 +0000 (16:28 +0530)
committerAtul Rai <a.rai@samsung.com>
Thu, 29 Mar 2018 04:18:16 +0000 (09:48 +0530)
This patch enables check-TESTS (unit test case execution) for bluez at
build time using %check section in bluez.spec. This patch,
 - Modifies unit/test-gobex.c, unit/test-gatt.c, unit/test-hog.c and
   unit/test-gattrib.c to handle Tizen specific changes in BlueZ.
 - Disables crypto test cases (unit/test-crypto) as QEMU (v2.7.0) in
   Tizen does not support AF_ALG socket option for cypher algorithms.

Change-Id: I5a49ac00a26fe5c1baf92b02915cf1bcfa30f68b
Signed-off-by: Atul Rai <a.rai@samsung.com>
Makefile.am
configure.ac
packaging/bluez.spec
unit/test-gatt.c
unit/test-gattrib.c
unit/test-gobex.c
unit/test-hog.c

index 676b931..b2c6b87 100755 (executable)
@@ -296,10 +296,12 @@ unit_tests += unit/test-crc
 unit_test_crc_SOURCES = unit/test-crc.c monitor/crc.h monitor/crc.c
 unit_test_crc_LDADD = src/libshared-glib.la @GLIB_LIBS@
 
+if TIZEN_CRYPTO_TESTS
 unit_tests += unit/test-crypto
 
 unit_test_crypto_SOURCES = unit/test-crypto.c
 unit_test_crypto_LDADD = src/libshared-glib.la @GLIB_LIBS@
+endif
 
 unit_tests += unit/test-ecc
 
index 2256123..e0ffa61 100755 (executable)
@@ -349,6 +349,10 @@ AC_ARG_ENABLE(le, AC_HELP_STRING([--enable-le],
                        [Enable LE Plugin]), [enable_le=${enableval}])
 AM_CONDITIONAL(TIZEN_LE_PLUGIN, test "${enable_le}" = "yes")
 
+AC_ARG_ENABLE(crypto-tests, AC_HELP_STRING([--disable-crypto-tests],
+               [Disable CRYPTO testcases]), [enable_crypto_tests=${enableval}])
+AM_CONDITIONAL(TIZEN_CRYPTO_TESTS, test "${enable_crypto_tests}" != "no")
+
 # End of TIZEN_FEATURE_BLUEZ_MODIFY
 
 AC_ARG_ENABLE(deprecated, AC_HELP_STRING([--enable-deprecated],
index 91f6b6a..0b19c95 100755 (executable)
@@ -2,7 +2,7 @@
 # should anchor any reverse-dependencies
 %global __provides_exclude_from ^(.*\\.tm1)$
 
-%define __spec_check_pre exit 0
+#%define __spec_check_pre exit 0
 
 #%define with_libcapng --enable-capng
 %define _libpath /usr/lib
@@ -201,7 +201,8 @@ export CFLAGS+=" -DARCH64"
                        --enable-gatt \
                        --enable-experimental \
                        --enable-autopyypair=no \
-                       --enable-tizenunusedplugin=no
+                       --enable-tizenunusedplugin=no \
+                       --disable-crypto-tests
 
 make %{?_smp_mflags} all V=1
 
@@ -262,7 +263,8 @@ export CFLAGS+=" -DARCH64"
                        --enable-autopair=no \
                        --enable-hid=yes \
                        --enable-bredr=yes \
-                       --enable-tizenunusedplugin=no
+                       --enable-tizenunusedplugin=no \
+                       --disable-crypto-tests
 
 make %{?_smp_mflags} all V=1
 
@@ -326,7 +328,8 @@ export CFLAGS+=" -DARCH64"
                        --enable-autopair=no \
                        --enable-hid=yes \
                        --enable-bredr=yes \
-                       --enable-tizenunusedplugin=no
+                       --enable-tizenunusedplugin=no \
+                       --disable-crypto-tests
 
 make %{?_smp_mflags} all V=1
 
index 5d79e94..76d431f 100755 (executable)
@@ -124,6 +124,7 @@ struct context {
                raw_pdu(0x02, 0x00, 0x02),                              \
                raw_pdu(0x03, 0x00, 0x02)
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
 #define SERVICE_DATA_1_PDUS                                            \
                MTU_EXCHANGE_CLIENT_PDUS,                               \
                raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28),      \
@@ -144,11 +145,67 @@ struct context {
                                0x2a),                                  \
                raw_pdu(0x08, 0x07, 0x00, 0x08, 0x00, 0x03, 0x28),      \
                raw_pdu(0x01, 0x08, 0x07, 0x00, 0x0a),                  \
+               raw_pdu(0x0a, 0x03, 0x00),                              \
+               raw_pdu(0x0b, 0x54, 0x69, 0x7a, 0x65, 0x6e),            \
                raw_pdu(0x04, 0x04, 0x00, 0x04, 0x00),                  \
                raw_pdu(0x05, 0x01, 0x04, 0x00, 0x01, 0x29),            \
                raw_pdu(0x04, 0x08, 0x00, 0x08, 0x00),                  \
                raw_pdu(0x05, 0x01, 0x08, 0x00, 0x01, 0x29)
+#else
+#define SERVICE_DATA_1_PDUS                                            \
+               MTU_EXCHANGE_CLIENT_PDUS,                               \
+               raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28),      \
+               raw_pdu(0x11, 0x06, 0x01, 0x00, 0x04, 0x00, 0x01, 0x18),\
+               raw_pdu(0x10, 0x05, 0x00, 0xff, 0xff, 0x00, 0x28),      \
+               raw_pdu(0x11, 0x06, 0x05, 0x00, 0x08, 0x00, 0x0d, 0x18),\
+               raw_pdu(0x10, 0x09, 0x00, 0xff, 0xff, 0x00, 0x28),      \
+               raw_pdu(0x01, 0x10, 0x09, 0x00, 0x0a),                  \
+               raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x01, 0x28),      \
+               raw_pdu(0x01, 0x10, 0x01, 0x00, 0x0a),                  \
+               raw_pdu(0x08, 0x01, 0x00, 0x08, 0x00, 0x02, 0x28),      \
+               raw_pdu(0x01, 0x08, 0x01, 0x00, 0x0a),                  \
+               raw_pdu(0x08, 0x01, 0x00, 0x08, 0x00, 0x03, 0x28),      \
+               raw_pdu(0x09, 0x07, 0x02, 0x00, 0x02, 0x03, 0x00, 0x00, \
+                               0x2a),                                  \
+               raw_pdu(0x08, 0x03, 0x00, 0x08, 0x00, 0x03, 0x28),      \
+               raw_pdu(0x09, 0x07, 0x06, 0x00, 0x0a, 0x07, 0x00, 0x29, \
+                               0x2a),                                  \
+               raw_pdu(0x08, 0x07, 0x00, 0x08, 0x00, 0x03, 0x28),      \
+               raw_pdu(0x01, 0x08, 0x07, 0x00, 0x0a),                  \
+               raw_pdu(0x04, 0x04, 0x00, 0x04, 0x00),                  \
+               raw_pdu(0x05, 0x01, 0x04, 0x00, 0x01, 0x29),            \
+               raw_pdu(0x04, 0x08, 0x00, 0x08, 0x00),                  \
+               raw_pdu(0x05, 0x01, 0x08, 0x00, 0x01, 0x29)
+#endif
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+#define SERVICE_DATA_2_PDUS                                            \
+               MTU_EXCHANGE_CLIENT_PDUS,                               \
+               raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28),      \
+               raw_pdu(0x11, 0x06, 0x01, 0x00, 0x04, 0x00, 0x01, 0x18),\
+               raw_pdu(0x10, 0x05, 0x00, 0xff, 0xff, 0x00, 0x28),      \
+               raw_pdu(0x11, 0x06, 0x05, 0x00, 0x0a, 0x00, 0x0d, 0x18),\
+               raw_pdu(0x10, 0x0b, 0x00, 0xff, 0xff, 0x00, 0x28),      \
+               raw_pdu(0x01, 0x10, 0x0b, 0x00, 0x0a),                  \
+               raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x01, 0x28),      \
+               raw_pdu(0x01, 0x10, 0x01, 0x00, 0x0a),                  \
+               raw_pdu(0x08, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x28),      \
+               raw_pdu(0x01, 0x08, 0x01, 0x00, 0x0a),                  \
+               raw_pdu(0x08, 0x01, 0x00, 0x0a, 0x00, 0x03, 0x28),      \
+               raw_pdu(0x09, 0x07, 0x02, 0x00, 0x02, 0x03, 0x00, 0x00, \
+                               0x2a),                                  \
+               raw_pdu(0x08, 0x03, 0x00, 0x0a, 0x00, 0x03, 0x28),      \
+               raw_pdu(0x09, 0x07, 0x07, 0x00, 0x0a, 0x08, 0x00, 0x29, \
+                               0x2a),                                  \
+               raw_pdu(0x08, 0x08, 0x00, 0x0a, 0x00, 0x03, 0x28),      \
+               raw_pdu(0x01, 0x08, 0x08, 0x00, 0x0a),                  \
+               raw_pdu(0x0a, 0x03, 0x00),                              \
+               raw_pdu(0x0b, 0x54, 0x69, 0x7a, 0x65, 0x6e),            \
+               raw_pdu(0x04, 0x04, 0x00, 0x04, 0x00),                  \
+               raw_pdu(0x05, 0x01, 0x04, 0x00, 0x01, 0x29),            \
+               raw_pdu(0x04, 0x09, 0x00, 0x0a, 0x00),                  \
+               raw_pdu(0x05, 0x01, 0x0a, 0x00, 0x01, 0x29)
+#else
 #define SERVICE_DATA_2_PDUS                                            \
                MTU_EXCHANGE_CLIENT_PDUS,                               \
                raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28),      \
@@ -173,7 +230,9 @@ struct context {
                raw_pdu(0x05, 0x01, 0x04, 0x00, 0x01, 0x29),            \
                raw_pdu(0x04, 0x09, 0x00, 0x0a, 0x00),                  \
                raw_pdu(0x05, 0x01, 0x0a, 0x00, 0x01, 0x29)
+#endif
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
 #define SERVICE_DATA_3_PDUS                                            \
                MTU_EXCHANGE_CLIENT_PDUS,                               \
                raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28),      \
@@ -195,10 +254,39 @@ struct context {
                        0x2a),                                          \
                raw_pdu(0x08, 0x11, 0x03, 0x20, 0x03, 0x03, 0x28),      \
                raw_pdu(0x01, 0x08, 0x11, 0x03, 0x0a),                  \
+               raw_pdu(0x0a, 0x11, 0x01),                              \
+               raw_pdu(0x0b, 0x54, 0x69, 0x7a, 0x65, 0x6e),            \
                raw_pdu(0x04, 0x12, 0x01, 0x1f, 0x01),                  \
                raw_pdu(0x01, 0x04, 0x12, 0x01, 0x0a),                  \
                raw_pdu(0x04, 0x12, 0x03, 0x20, 0x03),                  \
                raw_pdu(0x05, 0x01, 0x20, 0x03, 0x02, 0x29)
+#else
+#define SERVICE_DATA_3_PDUS                                            \
+               MTU_EXCHANGE_CLIENT_PDUS,                               \
+               raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28),      \
+               raw_pdu(0x11, 0x06, 0x00, 0x01, 0x21, 0x01, 0x00, 0x18, \
+                       0x00, 0x02, 0x00, 0x02, 0x01, 0x18),            \
+               raw_pdu(0x10, 0x01, 0x02, 0xff, 0xff, 0x00, 0x28),      \
+               raw_pdu(0x11, 0x06, 0x00, 0x03, 0x20, 0x03, 0x0d, 0x18),\
+               raw_pdu(0x10, 0x21, 0x03, 0xff, 0xff, 0x00, 0x28),      \
+               raw_pdu(0x01, 0x10, 0x21, 0x03, 0x0a),                  \
+               raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x01, 0x28),      \
+               raw_pdu(0x01, 0x10, 0x01, 0x00, 0x0a),                  \
+               raw_pdu(0x08, 0x00, 0x01, 0x20, 0x03, 0x02, 0x28),      \
+               raw_pdu(0x01, 0x08, 0x00, 0x01, 0x0a),                  \
+               raw_pdu(0x08, 0x00, 0x01, 0x20, 0x03, 0x03, 0x28),      \
+               raw_pdu(0x09, 0x07, 0x10, 0x01, 0x02, 0x11, 0x01, 0x00, \
+                       0x2a, 0x20, 0x01, 0x02, 0x21, 0x01, 0x01, 0x2a),\
+               raw_pdu(0x08, 0x21, 0x01, 0x20, 0x03, 0x03, 0x28),      \
+               raw_pdu(0x09, 0x07, 0x10, 0x03, 0x0a, 0x11, 0x03, 0x29, \
+                       0x2a),                                          \
+               raw_pdu(0x08, 0x11, 0x03, 0x20, 0x03, 0x03, 0x28),      \
+               raw_pdu(0x01, 0x08, 0x11, 0x03, 0x0a),                  \
+               raw_pdu(0x04, 0x12, 0x01, 0x1f, 0x01),                  \
+               raw_pdu(0x01, 0x04, 0x12, 0x01, 0x0a),                  \
+               raw_pdu(0x04, 0x12, 0x03, 0x20, 0x03),                  \
+               raw_pdu(0x05, 0x01, 0x20, 0x03, 0x02, 0x29)
+#endif
 
 #define PRIMARY_DISC_SMALL_DB                                          \
                raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28),      \
@@ -243,6 +331,26 @@ struct context {
                raw_pdu(0x08, 0x12, 0xf0, 0xff, 0xff, 0x02, 0x28),      \
                raw_pdu(0x01, 0x08, 0x12, 0xf0, 0x0a)
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+#define CHARACTERISTIC_DISC_SMALL_DB                                   \
+               raw_pdu(0x08, 0x01, 0x00, 0xff, 0xff, 0x03, 0x28),      \
+               raw_pdu(0x09, 0x07, 0x02, 0x00, 0xb2, 0x03, 0x00, 0x29, \
+                       0x2a),                                          \
+               raw_pdu(0x08, 0x03, 0x00, 0xff, 0xff, 0x03, 0x28),      \
+               raw_pdu(0x09, 0x07, 0x12, 0xf0, 0x02, 0x13, 0xf0, 0x00, \
+                       0x2a),                                          \
+               raw_pdu(0x08, 0x13, 0xf0, 0xff, 0xff, 0x03, 0x28),      \
+               raw_pdu(0x09, 0x15, 0x14, 0xf0, 0x82, 0x15, 0xf0, 0xef, \
+                       0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0x00, \
+                       0x00, 0x00, 0x00, 0x09, 0xB0, 0x00, 0x00),      \
+               raw_pdu(0x08, 0x15, 0xf0, 0xff, 0xff, 0x03, 0x28),      \
+               raw_pdu(0x09, 0x07, 0x17, 0xf0, 0x02, 0x18, 0xf0, 0x01, \
+                       0x2a),                                          \
+               raw_pdu(0x08, 0x18, 0xf0, 0xff, 0xff, 0x03, 0x28),      \
+               raw_pdu(0x01, 0x08, 0x18, 0xf0, 0x0a),                  \
+               raw_pdu(0x0a, 0x13, 0xf0),                              \
+               raw_pdu(0x0b, 0x54, 0x69, 0x7a, 0x65, 0x6e)
+#else
 #define CHARACTERISTIC_DISC_SMALL_DB                                   \
                raw_pdu(0x08, 0x01, 0x00, 0xff, 0xff, 0x03, 0x28),      \
                raw_pdu(0x09, 0x07, 0x02, 0x00, 0xb2, 0x03, 0x00, 0x29, \
@@ -259,6 +367,7 @@ struct context {
                        0x2a),                                          \
                raw_pdu(0x08, 0x18, 0xf0, 0xff, 0xff, 0x03, 0x28),      \
                raw_pdu(0x01, 0x08, 0x18, 0xf0, 0x0a)
+#endif
 
 #define DESCRIPTOR_DISC_SMALL_DB                                       \
                raw_pdu(0x04, 0x04, 0x00, 0x10, 0x00),                  \
@@ -395,7 +504,11 @@ static gboolean send_pdu(gpointer user_data)
 
                /* Quit the context if we processed the last PDU */
                if (!context->data->pdu_list[context->pdu_offset].valid) {
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+                       g_idle_add(context_quit, context);
+#else
                        context_quit(context);
+#endif
                        return FALSE;
                }
 
@@ -409,7 +522,11 @@ static void context_process(struct context *context)
 {
        /* Quit the context if we processed the last PDU */
        if (!context->data->pdu_list[context->pdu_offset].valid) {
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+               g_idle_add(context_quit, context);
+#else
                context_quit(context);
+#endif
                return;
        }
 
@@ -619,7 +736,11 @@ static void client_ready_cb(bool success, uint8_t att_ecode, void *user_data)
        g_assert(success);
 
        if (!context->data->source_db) {
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+               g_idle_add(context_quit, context);
+#else
                context_quit(context);
+#endif
                return;
        }
 
@@ -640,7 +761,11 @@ static void client_ready_cb(bool success, uint8_t att_ecode, void *user_data)
                return;
        }
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+       g_idle_add(context_quit, context);
+#else
        context_quit(context);
+#endif
 }
 
 static struct context *create_context(uint16_t mtu, gconstpointer data)
@@ -721,7 +846,11 @@ static void generic_search_cb(bool success, uint8_t att_ecode,
 
        g_assert(success);
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+       g_idle_add(context_quit, context);
+#else
        context_quit(context);
+#endif
 }
 
 static void test_read_cb(bool success, uint8_t att_ecode,
@@ -738,7 +867,11 @@ static void test_read_cb(bool success, uint8_t att_ecode,
                g_assert(memcmp(value, step->value, length) == 0);
        }
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+       g_idle_add(context_quit, context);
+#else
        context_quit(context);
+#endif
 }
 
 static void test_read(struct context *context)
@@ -834,7 +967,11 @@ static void test_write_cb(bool success, uint8_t att_ecode, void *user_data)
 
        g_assert(att_ecode == step->expected_att_ecode);
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+       g_idle_add(context_quit, context);
+#else
        context_quit(context);
+#endif
 }
 
 static void test_write(struct context *context)
@@ -962,6 +1099,7 @@ static const struct test_step test_write_without_response_1 = {
        .length = 0x03
 };
 
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
 static bool local_counter(uint32_t *sign_cnt, void *user_data)
 {
        static uint32_t cnt = 0;
@@ -978,7 +1116,12 @@ static void test_signed_write(struct context *context)
                                0xC0, 0x5A, 0x2E, 0x88, 0x30, 0x81, 0x88 };
 
        if (!bt_att_has_crypto(context->att)) {
+               test_debug("Calling context_quit 7", "GATT: ");
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+               g_idle_add(context_quit, context);
+#else
                context_quit(context);
+#endif
                return;
        }
 
@@ -1023,6 +1166,7 @@ static const struct test_step test_signed_write_seclevel_1 = {
        .value = write_data_1,
        .length = 0x03
 };
+#endif
 
 static void test_long_write_cb(bool success, bool reliable_error,
                                        uint8_t att_ecode, void *user_data)
@@ -1032,7 +1176,11 @@ static void test_long_write_cb(bool success, bool reliable_error,
 
        g_assert(att_ecode == step->expected_att_ecode);
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+       g_idle_add(context_quit, context);
+#else
        context_quit(context);
+#endif
 }
 
 static void test_long_write(struct context *context)
@@ -1154,7 +1302,11 @@ static void test_reliable_write_cb(bool success, bool reliable_error,
 
        g_assert(!reliable_error);
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+       g_idle_add(context_quit, context);
+#else
        context_quit(context);
+#endif
 }
 
 static void test_reliable_write(struct context *context)
@@ -2008,7 +2160,11 @@ static void multiple_read_cb(bool success, uint8_t att_ecode,
                g_assert(memcmp(value, step->value, length) == 0);
        }
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+       g_idle_add(context_quit, context);
+#else
        context_quit(context);
+#endif
 }
 
 static void test_multiple_read(struct context *context)
@@ -2091,7 +2247,11 @@ static void read_by_type_cb(bool success, uint8_t att_ecode,
                                                        &length, &value));
        }
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+       g_idle_add(context_quit, context);
+#else
        context_quit(context);
+#endif
 }
 
 static void test_read_by_type(gconstpointer data)
@@ -2225,7 +2385,11 @@ static void notification_cb(uint16_t value_handle, const uint8_t *value,
 
                g_assert(memcmp(value, step->value, length) == 0);
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+               g_idle_add(context_quit, context);
+#else
                context_quit(context);
+#endif
        }
 }
 
@@ -2274,7 +2438,11 @@ static void test_indication_cb(void *user_data)
 
        indication_received = 1;
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+       g_idle_add(context_quit, context);
+#else
        context_quit(context);
+#endif
 }
 
 static void test_server_indication_confirm(struct context *context)
@@ -2351,11 +2519,24 @@ int main(int argc, char *argv[])
         */
 
        define_test_client("/TP/GAC/CL/BV-01-C", test_client, NULL, NULL,
-                                               raw_pdu(0x02, 0x00, 0x02));
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
+                                               raw_pdu(0x02, 0x00, 0x02)
+#else
+                                               raw_pdu(0x02, 0x00, 0x02),
+                                               raw_pdu(0x03, 0x00, 0x02),
+                                               raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28),
+                                               raw_pdu(0x01, 0x10, 0x00, 0x00, 0x0a)
+#endif
+                       );
 
        define_test_server("/TP/GAC/SR/BV-01-C", test_server, service_db_1,
                                        NULL,
-                                       raw_pdu(0x03, 0x00, 0x02));
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
+                                       raw_pdu(0x03, 0x00, 0x02)
+#else
+                                       raw_pdu(0x03, 0x17, 0x00)
+#endif
+                       );
 
        /*
         * Discovery
@@ -2385,7 +2566,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-01-C", test_server, service_db_1,
                        NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28),
                        raw_pdu(0x11, 0x06, 0x01, 0x00, 0x04, 0x00, 0x01, 0x18,
                                        0x05, 0x00, 0x08, 0x00, 0x0d, 0x18),
@@ -2394,12 +2579,20 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-01-C-small", test_server, ts_small_db,
                        NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        PRIMARY_DISC_SMALL_DB);
 
        define_test_server("/TP/GAD/SR/BV-01-C-large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        PRIMARY_DISC_LARGE_DB_1);
 
        define_test_att("/TP/GAD/CL/BV-02-C-1", test_search_primary, &uuid_16,
@@ -2436,7 +2629,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-02-C/exists-16/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0x00,
                                0x18),
                        raw_pdu(0x07, 0x10, 0xf0, 0x18, 0xf0),
@@ -2446,7 +2643,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-02-C/exists-16/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0x0b,
                                0xa0),
                        raw_pdu(0x07, 0x30, 0x00, 0x32, 0x00, 0x50, 0x00, 0x52,
@@ -2458,21 +2659,33 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-02-C/missing-16/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        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,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        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,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        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),
@@ -2485,7 +2698,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-02-C/missing-128/large-1",
                        test_server, ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        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),
@@ -2516,7 +2733,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-03-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x01, 0x00, 0xff, 0xff, 0x02, 0x28),
                        raw_pdu(0x09, 0x08, 0x11, 0xf0, 0x01, 0x00, 0x10, 0x00,
                                        0x0a, 0x18),
@@ -2525,7 +2746,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-03-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x01, 0x00, 0xff, 0xff, 0x02, 0x28),
                        raw_pdu(0x09, 0x08, 0x02, 0x00, 0x80, 0x00, 0x86, 0x00,
                                0x0b, 0xa0, 0x21, 0x00, 0x01, 0x00, 0x06, 0x00,
@@ -2552,7 +2777,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-04-C/small/1", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x10, 0xf0, 0x18, 0xf0, 0x03, 0x28),
                        raw_pdu(0x09, 0x07, 0x12, 0xf0, 0x02, 0x13, 0xf0, 0x00,
                                        0x2a),
@@ -2569,7 +2798,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-04-C/small/2", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x01, 0x00, 0x0f, 0x00, 0x03, 0x28),
                        raw_pdu(0x09, 0x07, 0x02, 0x00, 0xb2, 0x03, 0x00, 0x29,
                                        0x2a),
@@ -2578,7 +2811,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-04-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x20, 0x00, 0x29, 0x00, 0x03, 0x28),
                        raw_pdu(0x09, 0x07, 0x22, 0x00, 0x02, 0x23, 0x00, 0x01,
                                0xb0, 0x24, 0x00, 0x0a, 0x25, 0x00, 0x02, 0xb0,
@@ -2605,7 +2842,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-05-C/small/1", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x10, 0xf0, 0x17, 0xf0, 0x03, 0x28),
                        raw_pdu(0x09, 0x07, 0x12, 0xf0, 0x02, 0x13, 0xf0, 0x00,
                                        0x2a),
@@ -2622,7 +2863,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-05-C/small/2", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x01, 0x00, 0x0f, 0x00, 0x03, 0x28),
                        raw_pdu(0x09, 0x07, 0x02, 0x00, 0xb2, 0x03, 0x00, 0x29,
                                        0x2a),
@@ -2631,7 +2876,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-05-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x20, 0x00, 0x29, 0x00, 0x03, 0x28),
                        raw_pdu(0x09, 0x07, 0x22, 0x00, 0x02, 0x23, 0x00, 0x01,
                                0xb0, 0x24, 0x00, 0x0a, 0x25, 0x00, 0x02, 0xb0,
@@ -2665,14 +2914,22 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAD/SR/BV-06-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x04, 0x04, 0x00, 0x05, 0x00),
                        raw_pdu(0x05, 0x01, 0x04, 0x00, 0x02, 0x29, 0x05, 0x00,
                                        0x01, 0x29));
 
        define_test_server("/TP/GAD/SR/BV-06-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x04, 0x73, 0x00, 0x76, 0x00),
                        raw_pdu(0x05, 0x01, 0x73, 0x00, 0x00, 0x29, 0x74, 0x00,
                                0x01, 0x29, 0x75, 0x00, 0x04, 0x29),
@@ -2727,13 +2984,21 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAR/SR/BV-01-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0a, 0x03, 0x00),
                        raw_pdu(0x0b, 0x42, 0x6c, 0x75, 0x65, 0x5a));
 
        define_test_server("/TP/GAR/SR/BV-01-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0a, 0xc4, 0x00),
                        raw_pdu(0x0b, '1', '1', '1', '1', '1', '2', '2', '2',
                                '2', '2', '3', '3', '3', '3', '3', '4', '4',
@@ -2745,20 +3010,32 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAR/SR/BI-02-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0a, 0x00, 0x00),
                        raw_pdu(0x01, 0x0a, 0x00, 0x00, 0x01));
 
        define_test_server("/TP/GAR/SR/BI-02-C/large", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0a, 0x0f, 0xf0),
                        raw_pdu(0x01, 0x0a, 0x0f, 0xf0, 0x01));
 
        define_test_att("/TP/GAR/CL/BV-03-C-1", test_read_by_type,
                        &uuid_char_16, &test_read_by_type_1,
                        raw_pdu(0x02, 0x00, 0x02),
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x01, 0x00, 0xff, 0xff, 0x0d, 0x2a),
                        raw_pdu(0x09, 0x05, 0x0a, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x08, 0x0b, 0x00, 0xff, 0xff, 0x0d, 0x2a),
@@ -2767,7 +3044,11 @@ int main(int argc, char *argv[])
        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),
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x01, 0x00, 0xff, 0xff, 0x0f, 0x0e, 0x0d,
                                        0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
                                        0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
@@ -2811,7 +3092,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAR/SR/BV-03-C/small", test_server, ts_small_db,
                        NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x01, 0x00, 0xFF, 0xFF, 0xef, 0xcd, 0xab,
                                        0x89, 0x67, 0x45, 0x23, 0x01, 0x00,
                                        0x00, 0x00, 0x00, 0x09, 0xB0, 0x00,
@@ -2822,7 +3107,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAR/SR/BV-03-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x01, 0x00, 0xFF, 0xFF, 0xef, 0xcd, 0xab,
                                        0x89, 0x67, 0x45, 0x23, 0x01, 0x00,
                                        0x00, 0x00, 0x00, 0xd4, 0xd5, 0x00,
@@ -2835,37 +3124,61 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAR/SR/BI-06-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x01, 0x00, 0xFF, 0xFF, 0x07, 0xB0),
                        raw_pdu(0x01, 0x08, 0x32, 0x00, 0x02));
 
        define_test_server("/TP/GAR/SR/BI-07-C/small", test_server, ts_small_db,
                        NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x01, 0x00, 0xFF, 0xFF, 0xF0, 0x0F),
                        raw_pdu(0x01, 0x08, 0x01, 0x00, 0x0a));
 
        define_test_server("/TP/GAR/SR/BI-07-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x01, 0x00, 0xFF, 0xFF, 0xF0, 0x0F),
                        raw_pdu(0x01, 0x08, 0x01, 0x00, 0x0a));
 
        define_test_server("/TP/GAR/SR/BI-08-C/small", test_server, ts_small_db,
                        NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x02, 0x00, 0x01, 0x00, 0x00, 0x28),
                        raw_pdu(0x01, 0x08, 0x02, 0x00, 0x01));
 
        define_test_server("/TP/GAR/SR/BI-08-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x08, 0x02, 0x00, 0x01, 0x00, 0x00, 0x28),
                        raw_pdu(0x01, 0x08, 0x02, 0x00, 0x01));
 
        define_test_server("/TP/GAR/SR/BV-04-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0xD3, 0x00, 0x00, 0x00),
                        raw_pdu(0x0D, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
                                0x88, 0x99, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
@@ -2881,31 +3194,51 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAR/SR/BI-12-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0x27, 0x00, 0x00, 0x00),
                        raw_pdu(0x01, 0x0C, 0x27, 0x00, 0x02));
 
        define_test_server("/TP/GAR/SR/BI-13-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0x13, 0xF0, 0xF0, 0x00),
                        raw_pdu(0x01, 0x0C, 0x13, 0xF0, 0x07));
 
        define_test_server("/TP/GAR/SR/BI-13-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0xD3, 0x00, 0xF0, 0x00),
                        raw_pdu(0x01, 0x0C, 0xD3, 0x00, 0x07));
 
        define_test_server("/TP/GAR/SR/BI-14-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0xF0, 0x0F, 0x00, 0x00),
                        raw_pdu(0x01, 0x0C, 0xF0, 0x0F, 0x01));
 
        define_test_server("/TP/GAR/SR/BI-14-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0xF0, 0x0F, 0x00, 0x00),
                        raw_pdu(0x01, 0x0C, 0xF0, 0x0F, 0x01));
 
@@ -3115,13 +3448,21 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAR/SR/BV-05-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0e, 0x15, 0xF0, 0x03, 0x00),
                        raw_pdu(0x0f, 0x09, 'B', 'l', 'u', 'e', 'Z'));
 
        define_test_server("/TP/GAR/SR/BV-05-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0e, 0x44, 0x00, 0x06, 0x00, 0xC4, 0x00),
                        raw_pdu(0x0f, 0x11, 0x0B, '1', '1', '1', '1', '1', '2',
                                '2', '2', '2', '2', '3', '3', '3', '3', '3',
@@ -3129,32 +3470,52 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAR/SR/BI-18-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0e, 0x44, 0x00, 0x06, 0x00, 0x27, 0x00),
                        raw_pdu(0x01, 0x0e, 0x27, 0x00, 0x02));
 
        define_test_server("/TP/GAR/SR/BI-19-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0e, 0x15, 0xF0, 0xF0, 0x0F),
                        raw_pdu(0x01, 0x0e, 0xF0, 0x0F, 0x01));
 
        define_test_server("/TP/GAR/SR/BI-19-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0e, 0x44, 0x00, 0xF0, 0x0F),
                        raw_pdu(0x01, 0x0e, 0xF0, 0x0F, 0x01));
 
        define_test_server("/TP/GAR/SR/BV-06-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0A, 0x05, 0x00),
                        raw_pdu(0x0B, 'M', 'a', 'n', 'u', 'f', 'a', 'c', 't',
                                'u', 'r', 'e', 'r', ' ', 'N', 'a', 'm', 'e'));
 
        define_test_server("/TP/GAR/SR/BV-06-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0A, 0xD4, 0x00),
                        raw_pdu(0x0B, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
                                0x88, 0x99, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90,
@@ -3162,25 +3523,41 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAR/SR/BI-23-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0A, 0x96, 0x00),
                        raw_pdu(0x01, 0x0A, 0x96, 0x00, 0x02));
 
        define_test_server("/TP/GAR/SR/BI-24-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0A, 0xF0, 0x0F),
                        raw_pdu(0x01, 0x0A, 0xF0, 0x0F, 0x01));
 
        define_test_server("/TP/GAR/SR/BI-24-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0A, 0xF0, 0x0F),
                        raw_pdu(0x01, 0x0A, 0xF0, 0x0F, 0x01));
 
        define_test_server("/TP/GAR/SR/BV-07-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0xD1, 0x00, 0x00, 0x00),
                        raw_pdu(0x0D, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
                                0x88, 0x99, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90,
@@ -3194,7 +3571,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAR/SR/BV-08-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0xCE, 0x00, 0x00, 0x00),
                        raw_pdu(0x0D, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
                                0x88, 0x99, 0x00, 0x12, 0x34, 0x56, 0x78, 0x90,
@@ -3208,31 +3589,51 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAR/SR/BI-28-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0x96, 0x00, 0x00, 0x00),
                        raw_pdu(0x01, 0x0C, 0x96, 0x00, 0x02));
 
        define_test_server("/TP/GAR/SR/BI-29-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0x05, 0x00, 0xF0, 0x00),
                        raw_pdu(0x01, 0x0C, 0x05, 0x00, 0x07));
 
        define_test_server("/TP/GAR/SR/BI-29-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0xCE, 0x00, 0xF0, 0x00),
                        raw_pdu(0x01, 0x0C, 0xCE, 0x00, 0x07));
 
        define_test_server("/TP/GAR/SR/BI-30-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0xF0, 0x0F, 0x00, 0x00),
                        raw_pdu(0x01, 0x0C, 0xF0, 0x0F, 0x01));
 
        define_test_server("/TP/GAR/SR/BI-30-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x0C, 0xF0, 0x0F, 0x00, 0x00),
                        raw_pdu(0x01, 0x0C, 0xF0, 0x0F, 0x01));
 
@@ -3247,7 +3648,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAN/SR/BV-01-C", test_server, ts_small_db,
                        &test_notification_server_1,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x04, 0x00, 0x01, 0x00),
                        raw_pdu(0x13),
                        raw_pdu(),
@@ -3255,7 +3660,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAI/SR/BV-01-C", test_server, ts_small_db,
                        &test_indication_server_1,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x04, 0x00, 0x02, 0x00),
                        raw_pdu(0x13),
                        raw_pdu(),
@@ -3493,6 +3902,14 @@ int main(int argc, char *argv[])
                        SERVICE_DATA_1_PDUS,
                        raw_pdu(0x52, 0x07, 0x00, 0x01, 0x02, 0x03));
 
+       /*
+        * Currently qemu-arm version in Tizen is 2.7.0, but QEMU v2.7.0 does not have
+        * support for AF_ALG socket option for cypher algorithms. As per QEMU wiki,
+        * support for AF_ALG backends for cyphers algorithms is added in QEMU v2.10.
+        * Hence skipping crypto based test cases until QEMU version is upgraded to
+        * >= 2.10 in Tizen.
+        */
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
        define_test_client("/TP/GAW/CL/BV-02-C", test_client, service_db_1,
                        &test_signed_write_1,
                        SERVICE_DATA_1_PDUS,
@@ -3504,6 +3921,7 @@ int main(int argc, char *argv[])
                        service_db_1, &test_signed_write_seclevel_1,
                        SERVICE_DATA_1_PDUS,
                        raw_pdu(0x52, 0x07, 0x00, 0x01, 0x02, 0x03));
+#endif
 
        define_test_client("/TP/GAW/CL/BV-03-C", test_client, service_db_1,
                        &test_write_1,
@@ -3551,7 +3969,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BV-07-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x17, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x18, 0x00),
@@ -3561,7 +3983,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BV-07-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0xc4, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x17, 0xc4, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x18, 0x00),
@@ -3573,37 +3999,61 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BV-03-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x03, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x13));
 
        define_test_server("/TP/GAW/SR/BV-03-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x82, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x13));
 
        define_test_server("/TP/GAW/SR/BI-02-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x01, 0x12, 0x00, 0x00, 0x01));
 
        define_test_server("/TP/GAW/SR/BI-02-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x0f, 0xf0, 0x01, 0x02, 0x03),
                        raw_pdu(0x01, 0x12, 0x0f, 0xf0, 0x01));
 
        define_test_server("/TP/GAW/SR/BI-03-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x13, 0xf0, 0x01, 0x02, 0x03),
                        raw_pdu(0x01, 0x12, 0x13, 0xf0, 0x03));
 
        define_test_server("/TP/GAW/SR/BI-03-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x04, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x01, 0x12, 0x04, 0x00, 0x03));
 
@@ -3865,7 +4315,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BV-05-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
@@ -3879,7 +4333,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BV-05-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x82, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
@@ -3893,7 +4351,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BI-07-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
@@ -3901,7 +4363,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BI-07-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x0f, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
@@ -3909,7 +4375,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BI-08-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
@@ -3917,7 +4387,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BI-08-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x73, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
@@ -3983,7 +4457,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BV-06-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x17, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x18, 0x01),
@@ -3991,7 +4469,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BV-06-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x82, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x17, 0x82, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x18, 0x01),
@@ -3999,7 +4481,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BV-10-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x17, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x16, 0x15, 0xf0, 0x00, 0x00, 0x01, 0x02, 0x03),
@@ -4013,7 +4499,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BV-10-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x82, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x17, 0x82, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x16, 0x72, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
@@ -4027,25 +4517,41 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BI-14-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x01, 0x16, 0x00, 0x00, 0x01));
 
        define_test_server("/TP/GAW/SR/BI-14-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x0f, 0xf0, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x01, 0x16, 0x0f, 0xf0, 0x01));
 
        define_test_server("/TP/GAW/SR/BI-15-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x05, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x01, 0x16, 0x05, 0x00, 0x03));
 
        define_test_server("/TP/GAW/SR/BI-15-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x73, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x01, 0x16, 0x73, 0x00, 0x03));
 
@@ -4095,37 +4601,61 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BV-08-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x04, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x13));
 
        define_test_server("/TP/GAW/SR/BV-08-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x83, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x13));
 
        define_test_server("/TP/GAW/SR/BI-20-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x01, 0x12, 0x00, 0x00, 0x01));
 
        define_test_server("/TP/GAW/SR/BI-20-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x0f, 0xf0, 0x01, 0x02, 0x03),
                        raw_pdu(0x01, 0x12, 0x0f, 0xf0, 0x01));
 
        define_test_server("/TP/GAW/SR/BI-21-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x13, 0xf0, 0x01, 0x02, 0x03),
                        raw_pdu(0x01, 0x12, 0x13, 0xf0, 0x03));
 
        define_test_server("/TP/GAW/SR/BI-21-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x12, 0x04, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x01, 0x12, 0x04, 0x00, 0x03));
 
@@ -4387,7 +4917,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BV-09-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
@@ -4401,7 +4935,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BV-09-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x83, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
@@ -4415,7 +4953,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BI-25-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
@@ -4423,7 +4965,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BI-25-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x0f, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
@@ -4431,7 +4977,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BI-26-C/small", test_server,
                        ts_small_db, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x13, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
@@ -4439,7 +4989,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/TP/GAW/SR/BI-26-C/large-1", test_server,
                        ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
@@ -4447,7 +5001,11 @@ int main(int argc, char *argv[])
 
        define_test_server("/robustness/no-reliable-characteristic",
                        test_server, ts_large_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0x16, 0x82, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x17, 0x82, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
                        raw_pdu(0x16, 0x25, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03),
@@ -4461,13 +5019,21 @@ int main(int argc, char *argv[])
 
        define_test_server("/robustness/unkown-request",
                        test_server, service_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0xbf, 0x00),
                        raw_pdu(0x01, 0xbf, 0x00, 0x00, 0x06));
 
        define_test_server("/robustness/unkown-command",
                        test_server, service_db_1, NULL,
+#ifndef TIZEN_FEATURE_BLUEZ_MODIFY
                        raw_pdu(0x03, 0x00, 0x02),
+#else
+                       raw_pdu(0x03, 0x17, 0x00),
+#endif
                        raw_pdu(0xff, 0x00),
                        raw_pdu());
 
index 416e596..cd9bfef 100755 (executable)
@@ -108,7 +108,6 @@ static void teardown_context(struct context *cxt, gconstpointer data)
        g_main_loop_unref(cxt->main_loop);
 }
 
-
 static void test_debug(const char *str, void *user_data)
 {
        const char *prefix = user_data;
@@ -309,21 +308,37 @@ static void test_cancel(struct context *cxt, gconstpointer unused)
                                      G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL,
                                                            test_client, &data);
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+       memset(&results, 0x00, sizeof(struct result_data));
+#else
        results.pdu = NULL;
-
+#endif
        info.context = cxt;
        info.event_id = g_attrib_send(cxt->att, 0, data.expect.data,
                                                data.expect.size, result_canary,
                                                                &results, NULL);
-
        data.receive_cb = cancel_existing_attrib_event;
        data.user_data = &info;
 
        g_main_loop_run(cxt->main_loop);
 
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+       /*
+        * In Tizen, Result callback (result_canary()) will be invoked with
+        * status set to error when a pending request (request pdu is already
+        * sent but response not received yet) is cancelled. Hence results.pdu
+        * is expected to be non-NULL (Error response).
+        */
+       g_assert(results.pdu != NULL);
+       g_free(results.pdu);
+
+       memset(&results, 0x00, sizeof(struct result_data));
+#else
        g_assert(results.pdu == NULL);
 
        results.pdu = NULL;
+#endif
+
        data.expect.received = false;
        data.respond.sent = false;
 
index 66531a2..2cfa4e9 100755 (executable)
@@ -55,12 +55,21 @@ static uint8_t pkt_unauth_rsp[] = { 0x41 | FINAL_BIT, 0x00, 0x1c,
                                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                        0x00 };
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+static uint8_t pkt_auth_req[] = { G_OBEX_OP_CONNECT | FINAL_BIT, 0x00, 0x1c,
+                                       0x10, 0x00, 0x10, 0x00, 0x4e, 0x00,
+                                       0x15, 0x00, 0x10, 0xce, 0x9a, 0xe6,
+                                       0xf7, 0xab, 0x93, 0x57, 0xc3, 0x37,
+                                       0xa0, 0x54, 0x23, 0x3d, 0x66, 0x25,
+                                       0xdb };
+#else
 static uint8_t pkt_auth_req[] = { G_OBEX_OP_CONNECT | FINAL_BIT, 0x00, 0x1c,
                                        0x10, 0x00, 0x10, 0x00, 0x4e, 0x00,
                                        0x15, 0x00, 0x10, 0x5a, 0xd4, 0x93,
                                        0x93, 0xba, 0x4a, 0xf8, 0xac, 0xce,
                                        0x7f, 0x5b, 0x1a, 0x05, 0x38, 0x74,
                                        0x24 };
+#endif
 static uint8_t pkt_auth_rsp[] = { 0x20 | FINAL_BIT, 0x00, 0x07,
                                        0x10, 0x00, 0x10, 0x00 };
 
index d117968..d7040e1 100755 (executable)
@@ -136,7 +136,11 @@ static gboolean send_pdu(gpointer user_data)
        context->process = 0;
 
        if (!context->data->pdu_list[context->pdu_offset].valid)
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+               g_idle_add(context_quit, context);
+#else
                context_quit(context);
+#endif
 
        return FALSE;
 }