diff options
author | Pyun DoHyun <dh79.pyun@samsung.com> | 2020-09-01 06:34:23 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review> | 2020-09-01 06:34:23 +0000 |
commit | f1a43f8219d2b2684428d39ded82fc7004dcad27 (patch) | |
tree | 037fca205733b6d36e196a7a40cb4e2615e87b91 | |
parent | 474d06dd56701ec377be5d8d7ffc1499342133bb (diff) | |
parent | 8ab76cdebb84ff80d2835f298d8e6444c0f241ac (diff) | |
download | bluetooth-f1a43f8219d2b2684428d39ded82fc7004dcad27.tar.gz bluetooth-f1a43f8219d2b2684428d39ded82fc7004dcad27.tar.bz2 bluetooth-f1a43f8219d2b2684428d39ded82fc7004dcad27.zip |
Merge "Mesh: unit test: set transition time for node control" into tizensubmit/tizen/20200901.064142accepted/tizen/unified/20200902.011921
-rw-r--r-- | src/bluetooth-mesh.c | 4 | ||||
-rw-r--r-- | tests/test/bt_mesh_unit_test.c | 17 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/bluetooth-mesh.c b/src/bluetooth-mesh.c index b814d6a..f93498c 100644 --- a/src/bluetooth-mesh.c +++ b/src/bluetooth-mesh.c @@ -3148,7 +3148,7 @@ int bt_mesh_model_send_msg(bt_mesh_model_h model, strlen(msg_params->data), msg_params->data); req.msg_len = strlen(msg_params->data); - g_strlcpy(req.msg, msg_params->data, sizeof(msg_params->data) + 1); + g_strlcpy(req.msg, msg_params->data, req.msg_len + 1); } else { req.msg_len = 0; } @@ -3204,7 +3204,7 @@ int bt_mesh_group_send_msg(bt_mesh_group_h group, strlen(msg_params->data), msg_params->data); req.msg_len = strlen(msg_params->data); - g_strlcpy(req.msg, msg_params->data, sizeof(msg_params->data) + 1); + g_strlcpy(req.msg, msg_params->data, req.msg_len + 1); } else { req.msg_len = 0; } diff --git a/tests/test/bt_mesh_unit_test.c b/tests/test/bt_mesh_unit_test.c index f8980fd..85980bd 100644 --- a/tests/test/bt_mesh_unit_test.c +++ b/tests/test/bt_mesh_unit_test.c @@ -1789,8 +1789,13 @@ int test_input_callback(void *data) TC_PRT("Model Creation Failed!"); break; } - /* Sleep for 100 msec to allow network Proxy attach */ - usleep(100000); + + /* + * System-d has start-limit on number of process to be started in given time + * Sleep for 2000 msec + */ + usleep(2000); + /* Create Network */ network_name = g_strdup_printf("TestMeshNet%d", i); bt_mesh_network_h net_h; @@ -2731,7 +2736,7 @@ int test_input_callback(void *data) model_h = GUINT_TO_POINTER(strtoul(g_test_param.params[0], NULL, 16)); } - const char *msg_s = "0101"; + const char *msg_s = "01010000"; msg_params.opcode = 0x8202; msg_params.data = g_strdup(msg_s); ret = __bt_mesh_model_send_msg(model_h, appkey_h, &msg_params, @@ -2749,7 +2754,7 @@ int test_input_callback(void *data) model_h = GUINT_TO_POINTER(strtoul(g_test_param.params[0], NULL, 16)); } - const char *msg_s = "0001"; + const char *msg_s = "00010000"; msg_params.opcode = 0x8202; msg_params.data = g_strdup(msg_s); ret = __bt_mesh_model_send_msg(model_h, appkey_h, &msg_params, @@ -2767,7 +2772,7 @@ int test_input_callback(void *data) group_h = GUINT_TO_POINTER(strtoul(g_test_param.params[0], NULL, 16)); } - const char *msg_s = "0101"; + const char *msg_s = "01010000"; msg_params.opcode = 0x8202; msg_params.data = g_strdup(msg_s); ret = __bt_mesh_group_send_msg(group_h, appkey_h, &msg_params, @@ -2785,7 +2790,7 @@ int test_input_callback(void *data) group_h = GUINT_TO_POINTER(strtoul(g_test_param.params[0], NULL, 16)); } - const char *msg_s = "0001"; + const char *msg_s = "00010000"; msg_params.opcode = 0x8202; msg_params.data = g_strdup(msg_s); ret = __bt_mesh_group_send_msg(group_h, appkey_h, &msg_params, |