summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoHyun Pyun <dh79.pyun@samsung.com>2020-08-31 11:02:37 +0900
committerDoHyun Pyun <dh79.pyun@samsung.com>2020-08-31 11:02:37 +0900
commit42319b2547990a038348dade1498b4fc04fd4197 (patch)
tree8d84dacd9e69b758d6294953244992b0bfb20f94
parentd049fd009159a204309d2c51319e13a25b08aa6b (diff)
downloadbluetooth-42319b2547990a038348dade1498b4fc04fd4197.tar.gz
bluetooth-42319b2547990a038348dade1498b4fc04fd4197.tar.bz2
bluetooth-42319b2547990a038348dade1498b4fc04fd4197.zip
Cover the missed coverage functions and linessubmit/tizen/20200831.035527accepted/tizen/unified/20200901.042006
Change-Id: I07be13e0b7b539cec36c07db474b30e4e4f023c3 Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
-rw-r--r--src/bluetooth-gatt.c2
-rw-r--r--src/bluetooth-mesh.c10
-rw-r--r--tests/unittest/mock/bluetooth-mock.c5
-rw-r--r--tests/unittest/tct-bluetooth-core.cpp2
-rw-r--r--tests/unittest/tct-bluetooth-core_mobile.h14
-rw-r--r--tests/unittest/utc_bluetooth_mesh_network_negative.c103
-rw-r--r--tests/unittest/utc_bluetooth_mesh_network_positive.c25
7 files changed, 160 insertions, 1 deletions
diff --git a/src/bluetooth-gatt.c b/src/bluetooth-gatt.c
index 9fd356e..8c43fcd 100644
--- a/src/bluetooth-gatt.c
+++ b/src/bluetooth-gatt.c
@@ -3207,6 +3207,7 @@ int bt_gatt_server_send_response(int request_id, bt_gatt_att_request_type_e requ
return ret;
} /* LCOV_EXCL_STOP */
+/* LCOV_EXCL_START */
static gboolean __notify_characteristic_changed_value_cb(gpointer user_data)
{
struct notify_char_changed_cb_s *cb_data = user_data;
@@ -3228,6 +3229,7 @@ static gboolean __notify_characteristic_changed_value_cb(gpointer user_data)
g_free(cb_data);
return FALSE;
}
+/* LCOV_EXCL_STOP */
int bt_gatt_server_notify_characteristic_changed_value(bt_gatt_h characteristic,
bt_gatt_server_notification_sent_cb callback,
diff --git a/src/bluetooth-mesh.c b/src/bluetooth-mesh.c
index 776e35e..b814d6a 100644
--- a/src/bluetooth-mesh.c
+++ b/src/bluetooth-mesh.c
@@ -171,6 +171,7 @@ static int __compare_netkey_index(gconstpointer a, gconstpointer b)
return (nk->netkey_index - netkey_index);
}
+/* LCOV_EXCL_START */
static int __simple_compare(gconstpointer a, gconstpointer b)
{
if (a == b)
@@ -178,6 +179,7 @@ static int __simple_compare(gconstpointer a, gconstpointer b)
else
return 1;
}
+/* LCOV_EXCL_STOP */
static int __compare_appkey_index(gconstpointer a, gconstpointer b)
{
@@ -285,6 +287,7 @@ bt_mesh_group_s* _bt_mesh_network_get_group(
return group_s;
}
+/* LCOV_EXCL_START */
bt_mesh_appkey_s* _bt_mesh_node_get_appkey(
bt_mesh_node_s *node_s, uint16_t appkey_idx)
{
@@ -297,6 +300,7 @@ bt_mesh_appkey_s* _bt_mesh_node_get_appkey(
return (bt_mesh_appkey_s*) l->data;
}
+/* LCOV_EXCL_STOP */
static bt_mesh_appkey_s *__bt_mesh_network_is_appkey_added(
bt_mesh_network_s *network_s,
@@ -346,12 +350,14 @@ static void __bt_mesh_free_elements(void *data)
g_free(elem);
}
+/* LCOV_EXCL_START */
static void __bt_mesh_free_appkeys(void *data)
{
bt_mesh_appkey_s *appkey = (bt_mesh_appkey_s*)data;
appkey_list = g_slist_remove(appkey_list, appkey);
g_free(appkey);
}
+/* LCOV_EXCL_STOP */
static gint __bt_mesh_compare_net_uuid(gpointer *a, gpointer *b)
{
@@ -596,6 +602,7 @@ bt_mesh_network_s * _bt_mesh_get_network_handle_info(char *net_uuid)
return (bt_mesh_network_s*)l->data;
}
+/* LCOV_EXCL_START */
char * _bt_mesh_get_auth_string_from_value(int auth)
{
switch(auth) {
@@ -640,6 +647,7 @@ char * _bt_mesh_get_auth_string_from_value(int auth)
return "";
}
}
+/* LCOV_EXCL_STOP */
/* Mesh API */
int bt_mesh_initialize(void)
@@ -838,6 +846,7 @@ int bt_mesh_node_destroy(bt_mesh_node_h node_handle)
return BT_ERROR_NONE;
}
+/* LCOV_EXCL_START */
static void __bt_mesh_destroy_network_handles(bt_mesh_network_s *net)
{
GSList *l;
@@ -892,6 +901,7 @@ static void __bt_mesh_destroy_network_handles(bt_mesh_network_s *net)
}
BT_INFO("Mesh: Handle Removal Done!");
}
+/* LCOV_EXCL_STOP */
static void __bt_mesh_generate_element(bt_mesh_node_s *node_s,
bt_mesh_element_s *elem_s)
diff --git a/tests/unittest/mock/bluetooth-mock.c b/tests/unittest/mock/bluetooth-mock.c
index c208c16..7c4d1ef 100644
--- a/tests/unittest/mock/bluetooth-mock.c
+++ b/tests/unittest/mock/bluetooth-mock.c
@@ -1007,6 +1007,11 @@ API int bluetooth_mesh_node_configure_key(bluetooth_mesh_key_configure_t *req)
return BLUETOOTH_ERROR_NONE;
}
+API int bluetooth_mesh_node_reset(bluetooth_mesh_node_info_t *node)
+{
+ return BLUETOOTH_ERROR_NONE;
+}
+
API int bluetooth_mesh_model_configure_appkey(bluetooth_mesh_model_configure_t *req)
{
bluetooth_event_param_t *bt_event = NULL;
diff --git a/tests/unittest/tct-bluetooth-core.cpp b/tests/unittest/tct-bluetooth-core.cpp
index aff0030..70a27d4 100644
--- a/tests/unittest/tct-bluetooth-core.cpp
+++ b/tests/unittest/tct-bluetooth-core.cpp
@@ -46,7 +46,7 @@ TEST(bluetooth, bluetooth)
strcpy(pszGetTCName, "utc_bluetooth");
int i = 0, result = 0;
- dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Executing TC Name = %s", __FUNCTION__, __LINE__, pszGetTCName);
+ dlog_print(DLOG_INFO, "NativeTCT", "\n[%s:%d] Executing TC Name = %s", __FUNCTION__, __LINE__, pszGetTCName);
int successCnt = 0;
int errorCnt = 0;
diff --git a/tests/unittest/tct-bluetooth-core_mobile.h b/tests/unittest/tct-bluetooth-core_mobile.h
index f8f287b..7b7f7e6 100644
--- a/tests/unittest/tct-bluetooth-core_mobile.h
+++ b/tests/unittest/tct-bluetooth-core_mobile.h
@@ -527,6 +527,7 @@ extern int utc_bluetooth_bt_mesh_network_set_name_p(void);
extern int utc_bluetooth_bt_mesh_network_get_name_p(void);
extern int utc_bluetooth_bt_mesh_network_add_netkey_p(void);
extern int utc_bluetooth_bt_mesh_network_foreach_netkeys_p(void);
+extern int utc_bluetooth_bt_mesh_network_destroy_n(void);
extern int utc_bluetooth_bt_mesh_netkey_get_index_p(void);
extern int utc_bluetooth_bt_mesh_netkey_update_p(void);
extern int utc_bluetooth_bt_mesh_netkey_delete_p(void);
@@ -544,6 +545,8 @@ extern int utc_bluetooth_bt_mesh_network_unprovisioned_device_scan_p(void);
extern int utc_bluetooth_bt_mesh_stop_unprovisioned_device_scan_p(void);
extern int utc_bluetooth_bt_mesh_network_provision_device_p(void);
extern int utc_bluetooth_bt_mesh_authentication_set_request_cb_p(void);
+extern int utc_bluetooth_bt_mesh_authentication_unset_request_cb_p(void);
+extern int utc_bluetooth_bt_mesh_authentication_unset_request_cb_n(void);
extern int utc_bluetooth_bt_mesh_authentication_reply_p(void);
extern int utc_bluetooth_bt_mesh_network_set_provisioning_capabilities_p(void);
extern int utc_bluetooth_bt_mesh_network_discover_node_p(void);
@@ -554,6 +557,8 @@ extern int utc_bluetooth_bt_mesh_node_get_ttl_p(void);
extern int utc_bluetooth_bt_mesh_node_set_ttl_p(void);
extern int utc_bluetooth_bt_mesh_node_configure_netkey_p(void);
extern int utc_bluetooth_bt_mesh_node_configure_appkey_p(void);
+extern int utc_bluetooth_bt_mesh_node_reset_n(void);
+extern int utc_bluetooth_bt_mesh_node_get_primary_address_n(void);
extern int utc_bluetooth_bt_mesh_model_bind_appkey_p(void);
extern int utc_bluetooth_bt_mesh_model_unbind_appkey_p(void);
extern int utc_bluetooth_bt_mesh_model_get_appkey_list_p(void);
@@ -562,7 +567,9 @@ extern int utc_bluetooth_bt_mesh_model_configure_virtual_group_subscription_p(vo
extern int utc_bluetooth_bt_mesh_model_get_subscription_list_p(void);
extern int utc_bluetooth_bt_mesh_model_set_publication_p(void);
extern int utc_bluetooth_bt_mesh_model_get_publication_p(void);
+extern int utc_bluetooth_bt_mesh_model_send_msg_n(void);
extern int utc_bluetooth_bt_mesh_appkey_get_netkey_p(void);
+extern int utc_bluetooth_bt_mesh_group_send_msg_n(void);
extern void utc_bluetooth_mesh_network_negative_startup(void);
@@ -1095,6 +1102,7 @@ testcase tc_array[] = {
{"utc_bluetooth_bt_mesh_stop_unprovisioned_device_scan_p",utc_bluetooth_bt_mesh_stop_unprovisioned_device_scan_p,utc_bluetooth_mesh_network_positive_startup, utc_bluetooth_mesh_network_positive_cleanup},
{"utc_bluetooth_bt_mesh_network_provision_device_p",utc_bluetooth_bt_mesh_network_provision_device_p,utc_bluetooth_mesh_network_positive_startup, utc_bluetooth_mesh_network_positive_cleanup},
{"utc_bluetooth_bt_mesh_authentication_set_request_cb_p",utc_bluetooth_bt_mesh_authentication_set_request_cb_p,utc_bluetooth_mesh_network_positive_startup, utc_bluetooth_mesh_network_positive_cleanup},
+ {"utc_bluetooth_bt_mesh_authentication_unset_request_cb_p",utc_bluetooth_bt_mesh_authentication_unset_request_cb_p,utc_bluetooth_mesh_network_positive_startup, utc_bluetooth_mesh_network_positive_cleanup},
{"utc_bluetooth_bt_mesh_authentication_reply_p",utc_bluetooth_bt_mesh_authentication_reply_p,utc_bluetooth_mesh_network_positive_startup,utc_bluetooth_mesh_network_positive_cleanup},
{"utc_bluetooth_bt_mesh_network_set_provisioning_capabilities_p",utc_bluetooth_bt_mesh_network_set_provisioning_capabilities_p,utc_bluetooth_mesh_network_positive_startup,utc_bluetooth_mesh_network_positive_cleanup},
{"utc_bluetooth_bt_mesh_network_discover_node_p",utc_bluetooth_bt_mesh_network_discover_node_p,utc_bluetooth_mesh_network_positive_startup,utc_bluetooth_mesh_network_positive_cleanup},
@@ -1133,6 +1141,7 @@ testcase tc_array[] = {
{"utc_bluetooth_bt_mesh_network_get_name_n",utc_bluetooth_bt_mesh_network_get_name_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_network_add_netkey_n",utc_bluetooth_bt_mesh_network_add_netkey_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_network_foreach_netkeys_n",utc_bluetooth_bt_mesh_network_foreach_netkeys_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
+ {"utc_bluetooth_bt_mesh_network_destroy_n",utc_bluetooth_bt_mesh_network_destroy_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_netkey_get_index_n",utc_bluetooth_bt_mesh_netkey_get_index_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_netkey_update_n",utc_bluetooth_bt_mesh_netkey_update_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_netkey_delete_n",utc_bluetooth_bt_mesh_netkey_delete_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
@@ -1150,6 +1159,7 @@ testcase tc_array[] = {
{"utc_bluetooth_bt_mesh_stop_unprovisioned_device_scan_n",utc_bluetooth_bt_mesh_stop_unprovisioned_device_scan_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_network_provision_device_n",utc_bluetooth_bt_mesh_network_provision_device_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_authentication_set_request_cb_n",utc_bluetooth_bt_mesh_authentication_set_request_cb_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
+ {"utc_bluetooth_bt_mesh_authentication_unset_request_cb_n",utc_bluetooth_bt_mesh_authentication_unset_request_cb_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_authentication_reply_n",utc_bluetooth_bt_mesh_authentication_reply_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_network_set_provisioning_capabilities_n",utc_bluetooth_bt_mesh_network_set_provisioning_capabilities_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_network_discover_node_n",utc_bluetooth_bt_mesh_network_discover_node_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
@@ -1160,6 +1170,8 @@ testcase tc_array[] = {
{"utc_bluetooth_bt_mesh_node_set_ttl_n",utc_bluetooth_bt_mesh_node_set_ttl_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_node_configure_netkey_n",utc_bluetooth_bt_mesh_node_configure_netkey_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_node_configure_appkey_n",utc_bluetooth_bt_mesh_node_configure_appkey_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
+ {"utc_bluetooth_bt_mesh_node_reset_n",utc_bluetooth_bt_mesh_node_reset_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
+ {"utc_bluetooth_bt_mesh_node_get_primary_address_n",utc_bluetooth_bt_mesh_node_get_primary_address_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_model_bind_appkey_n",utc_bluetooth_bt_mesh_model_bind_appkey_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_model_unbind_appkey_n",utc_bluetooth_bt_mesh_model_unbind_appkey_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_model_get_appkey_list_n",utc_bluetooth_bt_mesh_model_get_appkey_list_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
@@ -1167,7 +1179,9 @@ testcase tc_array[] = {
{"utc_bluetooth_bt_mesh_model_get_subscription_list_n",utc_bluetooth_bt_mesh_model_get_subscription_list_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_model_set_publication_n",utc_bluetooth_bt_mesh_model_set_publication_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_model_get_publication_n",utc_bluetooth_bt_mesh_model_get_publication_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
+ {"utc_bluetooth_bt_mesh_model_send_msg_n",utc_bluetooth_bt_mesh_model_send_msg_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
{"utc_bluetooth_bt_mesh_appkey_get_netkey_n",utc_bluetooth_bt_mesh_appkey_get_netkey_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},
+ {"utc_bluetooth_bt_mesh_group_send_msg_n",utc_bluetooth_bt_mesh_group_send_msg_n,utc_bluetooth_mesh_network_negative_startup,utc_bluetooth_mesh_network_negative_cleanup},\
{NULL, NULL}
};
diff --git a/tests/unittest/utc_bluetooth_mesh_network_negative.c b/tests/unittest/utc_bluetooth_mesh_network_negative.c
index 19e80fd..8882219 100644
--- a/tests/unittest/utc_bluetooth_mesh_network_negative.c
+++ b/tests/unittest/utc_bluetooth_mesh_network_negative.c
@@ -170,6 +170,24 @@ int utc_bluetooth_bt_mesh_node_destroy_n(void)
return 0;
}
+int utc_bluetooth_bt_mesh_node_reset_n(void)
+{
+ int ret = BT_ERROR_NONE;
+ bt_mesh_node_h local_node = NULL;
+
+ if (mesh_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+
+ ret = bt_mesh_node_reset(local_node);
+ assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+ } else {
+ ret = bt_mesh_node_reset(local_node);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
+
int utc_bluetooth_bt_mesh_node_create_element_n(void)
{
int ret = BT_ERROR_NONE;
@@ -481,6 +499,23 @@ int utc_bluetooth_bt_mesh_network_create_n(void)
return 0;
}
+int utc_bluetooth_bt_mesh_network_destroy_n(void)
+{
+ int ret = BT_ERROR_NONE;
+
+ if (mesh_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+
+ ret = bt_mesh_network_destroy(NULL);
+ assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+ } else {
+ ret = bt_mesh_network_destroy(NULL);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
+
int utc_bluetooth_bt_mesh_network_load_n(void)
{
int ret = BT_ERROR_NONE;
@@ -891,6 +926,23 @@ int utc_bluetooth_bt_mesh_authentication_set_request_cb_n(void)
return 0;
}
+int utc_bluetooth_bt_mesh_authentication_unset_request_cb_n(void)
+{
+ int ret = BT_ERROR_NONE;
+
+ if (mesh_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+
+ ret = bt_mesh_authentication_unset_request_cb(NULL);
+ assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+ } else {
+ ret = bt_mesh_authentication_unset_request_cb(NULL);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
+
int utc_bluetooth_bt_mesh_authentication_reply_n(void)
{
int ret = BT_ERROR_NONE;
@@ -1084,6 +1136,23 @@ int utc_bluetooth_bt_mesh_node_configure_appkey_n(void)
return 0;
}
+int utc_bluetooth_bt_mesh_node_get_primary_address_n(void)
+{
+ int ret = BT_ERROR_NONE;
+
+ if (mesh_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+
+ ret = bt_mesh_node_get_primary_address(NULL, NULL);
+ assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+ } else {
+ ret = bt_mesh_node_get_primary_address(NULL, NULL);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
+
int utc_bluetooth_bt_mesh_model_bind_appkey_n(void)
{
int ret = BT_ERROR_NONE;
@@ -1245,6 +1314,23 @@ int utc_bluetooth_bt_mesh_model_get_publication_n(void)
return 0;
}
+int utc_bluetooth_bt_mesh_model_send_msg_n(void)
+{
+ int ret = BT_ERROR_NONE;
+
+ if (mesh_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+
+ ret = bt_mesh_model_send_msg(model_h, NULL, NULL, NULL, NULL);
+ assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+ } else {
+ ret = bt_mesh_model_send_msg(model_h, NULL, NULL, NULL, NULL);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
+
int utc_bluetooth_bt_mesh_appkey_get_netkey_n(void)
{
int ret = BT_ERROR_NONE;
@@ -1261,3 +1347,20 @@ int utc_bluetooth_bt_mesh_appkey_get_netkey_n(void)
return 0;
}
+
+int utc_bluetooth_bt_mesh_group_send_msg_n(void)
+{
+ int ret = BT_ERROR_NONE;
+
+ if (mesh_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+
+ ret = bt_mesh_group_send_msg(NULL, NULL, NULL, NULL, NULL);
+ assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+ } else {
+ ret = bt_mesh_group_send_msg(NULL, NULL, NULL, NULL, NULL);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
diff --git a/tests/unittest/utc_bluetooth_mesh_network_positive.c b/tests/unittest/utc_bluetooth_mesh_network_positive.c
index 41a2d4c..96942d5 100644
--- a/tests/unittest/utc_bluetooth_mesh_network_positive.c
+++ b/tests/unittest/utc_bluetooth_mesh_network_positive.c
@@ -1047,9 +1047,15 @@ int utc_bluetooth_bt_mesh_authentication_set_request_cb_p(void)
ret = bt_mesh_authentication_set_request_cb(__bt_mesh_authentication_request_cb, NULL);
assert_eq(ret, BT_ERROR_NONE);
+
+ ret = bt_mesh_authentication_unset_request_cb(__bt_mesh_authentication_request_cb);
+ assert_eq(ret, BT_ERROR_NONE);
} else {
ret = bt_mesh_authentication_set_request_cb(__bt_mesh_authentication_request_cb, NULL);
assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+
+ ret = bt_mesh_authentication_unset_request_cb(__bt_mesh_authentication_request_cb);
+ assert_eq(ret, BT_ERROR_NONE);
}
return 0;
@@ -1076,6 +1082,25 @@ int utc_bluetooth_bt_mesh_authentication_reply_p(void)
return 0;
}
+int utc_bluetooth_bt_mesh_authentication_unset_request_cb_p(void)
+{
+ int ret = BT_ERROR_NONE;
+
+ if (mesh_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+
+ ret = bt_mesh_authentication_set_request_cb(__bt_mesh_authentication_request_cb, NULL);
+ assert_eq(ret, BT_ERROR_NONE);
+
+ ret = bt_mesh_authentication_unset_request_cb(__bt_mesh_authentication_request_cb);
+ assert_eq(ret, BT_ERROR_NONE);
+ } else {
+ ret = bt_mesh_authentication_unset_request_cb(__bt_mesh_authentication_request_cb);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
int utc_bluetooth_bt_mesh_network_set_provisioning_capabilities_p(void)
{