From: Anupam Roy Date: Thu, 13 Aug 2020 10:48:33 +0000 (+0530) Subject: Mesh: Add case for Node Reset in mesh unit test X-Git-Tag: accepted/tizen/unified/20200818.130015^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a12c6a8f98031fe94f8abe6df12d4ad43a6bb8da;p=platform%2Fcore%2Fapi%2Fbluetooth.git Mesh: Add case for Node Reset in mesh unit test Change-Id: If709fdab1d6bf0d811139b19af9ca557021ac3e0 Signed-off-by: Anupam Roy --- diff --git a/tests/test/bt_mesh_unit_test.c b/tests/test/bt_mesh_unit_test.c index fb9221b..4bba0e1 100644 --- a/tests/test/bt_mesh_unit_test.c +++ b/tests/test/bt_mesh_unit_test.c @@ -914,6 +914,10 @@ int test_set_params(int test_id, char *param){ param_count = 1; TC_PRT("Input param(%d) (device_uuid)", param_index + 1); break; + case BT_MESH_UNIT_TEST_FUNCTION_NODE_RESET: + param_count = 1; + TC_PRT("Input param(%d) (Node Handle)", param_index + 1); + break; case BT_MESH_UNIT_TEST_FUNCTION_NODE_GET_FEATURES: param_count = 1; TC_PRT("Input param(%d) (Node Handle)", param_index + 1); @@ -1610,7 +1614,14 @@ int test_input_callback(void *data) break; } case BT_MESH_UNIT_TEST_FUNCTION_NODE_RESET: { - // TODO: need to implement + bt_mesh_node_h node_h = 0; + if (g_test_param.param_count != 1) { + TC_PRT("Set Input parameter first!"); + break; + } + node_h = GUINT_TO_POINTER(strtoul(g_test_param.params[0], NULL, 16)); + ret = bt_mesh_node_reset(node_h); + TC_PRT("return %s\n", __bt_get_error_message(ret)); break; } case BT_MESH_UNIT_TEST_FUNCTION_NODE_GET_FEATURES: {