Home
last modified time | relevance | path

Searched refs:ok (Results 1 – 25 of 78) sorted by relevance

1234

/Zephyr-latest/subsys/mgmt/mcumgr/grp/enum_mgmt/src/
Denum_mgmt.c41 bool *ok; member
46 bool *ok; member
91 *data->ok = zcbor_uint32_put(data->zse, group->mg_group_id); in enum_mgmt_cb_list()
93 return *data->ok; in enum_mgmt_cb_list()
126 *data->ok = true; in enum_mgmt_cb_details()
137 *data->ok = zcbor_map_start_encode(data->zse, CONFIG_MCUMGR_GRP_ENUM_DETAILS_STATES) && in enum_mgmt_cb_details()
156 *data->ok = false; in enum_mgmt_cb_details()
162 if (*data->ok) { in enum_mgmt_cb_details()
163 *data->ok = zcbor_map_end_encode(data->zse, CONFIG_MCUMGR_GRP_ENUM_DETAILS_STATES); in enum_mgmt_cb_details()
167 return *data->ok; in enum_mgmt_cb_details()
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/enum_mgmt/src/
Dsmp_test_util.c30 bool ok; in create_enum_mgmt_count_packet() local
32 ok = zcbor_map_start_encode(zse, 2) && in create_enum_mgmt_count_packet()
35 if (!ok) { in create_enum_mgmt_count_packet()
50 bool ok; in create_enum_mgmt_list_packet() local
52 ok = zcbor_map_start_encode(zse, 2) && in create_enum_mgmt_list_packet()
55 if (!ok) { in create_enum_mgmt_list_packet()
70 bool ok; in create_enum_mgmt_single_packet() local
72 ok = zcbor_map_start_encode(zse, 2) && in create_enum_mgmt_single_packet()
77 if (!ok) { in create_enum_mgmt_single_packet()
92 bool ok; in create_enum_mgmt_details_packet() local
[all …]
Dmain.c109 bool ok; in ZTEST() local
130 ok = create_enum_mgmt_count_packet(zse, buffer, buffer_out, &buffer_size); in ZTEST()
131 zassert_true(ok, "Expected packet creation to be successful"); in ZTEST()
162 ok = zcbor_map_decode_bulk(zsd, output_decode, ARRAY_SIZE(output_decode), &decoded) == 0; in ZTEST()
163 zassert_true(ok, "Expected decode to be successful"); in ZTEST()
208 bool ok; in ZTEST() local
231 ok = create_enum_mgmt_list_packet(zse, buffer, buffer_out, &buffer_size); in ZTEST()
232 zassert_true(ok, "Expected packet creation to be successful"); in ZTEST()
263 ok = zcbor_map_decode_bulk(zsd, output_decode, ARRAY_SIZE(output_decode), &decoded) == 0; in ZTEST()
264 zassert_true(ok, "Expected decode to be successful"); in ZTEST()
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/settings_mgmt/src/
Dsmp_test_util.c30 bool ok; in create_settings_mgmt_read_packet() local
32 ok = zcbor_map_start_encode(zse, 2) && in create_settings_mgmt_read_packet()
45 return ok; in create_settings_mgmt_read_packet()
52 bool ok; in create_settings_mgmt_write_packet() local
54 ok = zcbor_map_start_encode(zse, 2) && in create_settings_mgmt_write_packet()
67 return ok; in create_settings_mgmt_write_packet()
73 bool ok; in create_settings_mgmt_delete_packet() local
75 ok = zcbor_map_start_encode(zse, 2) && in create_settings_mgmt_delete_packet()
85 return ok; in create_settings_mgmt_delete_packet()
91 bool ok; in create_settings_mgmt_commit_packet() local
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/fs_mgmt_hash_supported/src/
Dmain.c96 bool ok = true; in ZTEST() local
102 ok = zcbor_map_start_decode(state); in ZTEST()
104 ok = zcbor_tstr_decode(state, &key); in ZTEST()
111 ok = zcbor_map_start_decode(state); in ZTEST()
113 while (ok == true) { in ZTEST()
114 ok = zcbor_tstr_decode(state, &key); in ZTEST()
115 if (!ok) { in ZTEST()
135 ok = zcbor_map_start_decode(state); in ZTEST()
139 while (ok == true) { in ZTEST()
140 ok = zcbor_tstr_decode(state, &key); in ZTEST()
[all …]
/Zephyr-latest/subsys/mgmt/mcumgr/grp/shell_mgmt/src/
Dshell_mgmt.c48 bool ok; in shell_mgmt_exec() local
64 ok = zcbor_tstr_decode(zsd, &key); in shell_mgmt_exec()
66 if (ok) { in shell_mgmt_exec()
72 ok = zcbor_any_skip(zsd, NULL); in shell_mgmt_exec()
74 } while (ok); in shell_mgmt_exec()
76 if (!ok || !zcbor_list_start_decode(zsd)) { in shell_mgmt_exec()
84 ok = zcbor_tstr_decode(zsd, &value); in shell_mgmt_exec()
85 if (ok) { in shell_mgmt_exec()
87 ok = smp_add_cmd_err(zse, MGMT_GROUP_ID_SHELL, in shell_mgmt_exec()
99 } while (ok); in shell_mgmt_exec()
[all …]
/Zephyr-latest/subsys/mgmt/mcumgr/grp/stat_mgmt/src/
Dstat_mgmt.c113 bool ok = zcbor_tstr_put_term(zse, entry->name, CONFIG_MCUMGR_GRP_STAT_MAX_NAME_LEN) && in stat_mgmt_cb_encode() local
116 return ok ? MGMT_ERR_EOK : MGMT_ERR_EMSGSIZE; in stat_mgmt_cb_encode()
128 bool ok; in stat_mgmt_show() local
137 ok = zcbor_map_decode_bulk(zsd, stat_decode, ARRAY_SIZE(stat_decode), &decoded) == 0; in stat_mgmt_show()
139 if (!ok || name.len == 0 || name.len >= ARRAY_SIZE(stat_name)) { in stat_mgmt_show()
148 ok = smp_add_cmd_err(zse, ZEPHYR_MGMT_GRP_BASIC, in stat_mgmt_show()
154 ok = zcbor_tstr_put_lit(zse, "rc") && in stat_mgmt_show()
158 if (ok) { in stat_mgmt_show()
159 ok = zcbor_tstr_put_lit(zse, "name") && in stat_mgmt_show()
165 if (ok) { in stat_mgmt_show()
[all …]
/Zephyr-latest/subsys/mgmt/mcumgr/grp/settings_mgmt/src/
Dsettings_mgmt.c37 bool ok; in settings_mgmt_read() local
56 ok = zcbor_map_decode_bulk(zsd, settings_read_decode, ARRAY_SIZE(settings_read_decode), in settings_mgmt_read()
59 if (!ok || key.len == 0) { in settings_mgmt_read()
67 ok = smp_add_cmd_err(zse, MGMT_GROUP_ID_SETTINGS, in settings_mgmt_read()
113 ok = smp_add_cmd_err(zse, ret_group, (uint16_t)ret_rc); in settings_mgmt_read()
132 ok = smp_add_cmd_err(zse, MGMT_GROUP_ID_SETTINGS, (uint16_t)rc); in settings_mgmt_read()
136 ok = zcbor_tstr_put_lit(zse, "val") && in settings_mgmt_read()
139 if (ok && limited_size) { in settings_mgmt_read()
140 ok = zcbor_tstr_put_lit(zse, "max_size") && in settings_mgmt_read()
150 return MGMT_RETURN_CHECK(ok); in settings_mgmt_read()
[all …]
/Zephyr-latest/subsys/mgmt/mcumgr/grp/fs_mgmt/src/
Dfs_mgmt.c117 bool ok; member
176 bool ok = true; in fs_mgmt_file_rsp() local
179 ok = zcbor_tstr_put_lit(zse, "rc") && in fs_mgmt_file_rsp()
183 return ok && zcbor_tstr_put_lit(zse, "off") && in fs_mgmt_file_rsp()
213 bool ok; in fs_mgmt_file_download() local
233 ok = zcbor_map_decode_bulk(zsd, fs_download_decode, ARRAY_SIZE(fs_download_decode), in fs_mgmt_file_download()
236 if (!ok || off == ULLONG_MAX || name.len == 0 || name.len > (sizeof(path) - 1)) { in fs_mgmt_file_download()
262 ok = smp_add_cmd_err(zse, err_group, (uint16_t)err_rc); in fs_mgmt_file_download()
275 ok = smp_add_cmd_err(zse, MGMT_GROUP_ID_FS, rc); in fs_mgmt_file_download()
292 ok = smp_add_cmd_err(zse, MGMT_GROUP_ID_FS, rc); in fs_mgmt_file_download()
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/handler_demo/example_as_module/src/
Dexample_mgmt.c37 bool ok; in example_mgmt_test() local
47 ok = zcbor_map_decode_bulk(zsd, example_test_decode, ARRAY_SIZE(example_test_decode), in example_mgmt_test()
52 if (!ok || string_value.len == 0 || !zcbor_map_decode_bulk_key_found( in example_mgmt_test()
59 ok = smp_add_cmd_err(zse, MGMT_GROUP_ID_EXAMPLE, EXAMPLE_MGMT_ERR_NOT_WANTED); in example_mgmt_test()
64 ok = zcbor_tstr_put_lit(zse, "return_int") && in example_mgmt_test()
71 return (ok ? MGMT_ERR_EOK : MGMT_ERR_EMSGSIZE); in example_mgmt_test()
80 bool ok; in example_mgmt_other() local
95 ok = zcbor_map_decode_bulk(zsd, example_other_decode, ARRAY_SIZE(example_other_decode), in example_mgmt_other()
101 if (!ok) { in example_mgmt_other()
119 ok = smp_add_cmd_err(zse, err_group, (uint16_t)err_rc); in example_mgmt_other()
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/
Dmain.c228 bool ok; in ZTEST() local
261 ok = create_mcumgr_format_packet(zse, "s", buffer, buffer_out, &buffer_size); in ZTEST()
262 zassert_true(ok, "Expected packet creation to be successful\n"); in ZTEST()
299 bool ok; in ZTEST() local
319 ok = create_mcumgr_format_packet(zse, query_kernel_name, buffer, buffer_out, &buffer_size); in ZTEST()
320 zassert_true(ok, "Expected packet creation to be successful\n"); in ZTEST()
343 ok = zcbor_map_decode_bulk(zsd, output_decode, ARRAY_SIZE(output_decode), &decoded) == 0; in ZTEST()
345 zassert_true(ok, "Expected decode to be successful\n"); in ZTEST()
360 bool ok; in ZTEST() local
380 ok = create_mcumgr_format_packet(zse, query_node_name, buffer, buffer_out, &buffer_size); in ZTEST()
[all …]
Dlimited.c42 bool ok; in ZTEST() local
62 ok = create_mcumgr_format_packet(zse, query_kernel_name, buffer, buffer_out, &buffer_size); in ZTEST()
63 zassert_true(ok, "Expected packet creation to be successful\n"); in ZTEST()
86 ok = zcbor_map_decode_bulk(zsd, output_decode, ARRAY_SIZE(output_decode), &decoded) == 0; in ZTEST()
88 zassert_true(ok, "Expected decode to be successful\n"); in ZTEST()
103 bool ok; in ZTEST() local
128 ok = create_mcumgr_format_packet(zse, query_all, buffer, buffer_out, &buffer_size); in ZTEST()
129 zassert_true(ok, "Expected packet creation to be successful\n"); in ZTEST()
153 ok = zcbor_map_decode_bulk(zsd, output_decode, ARRAY_SIZE(output_decode), &decoded) == 0; in ZTEST()
155 zassert_true(ok, "Expected decode to be successful\n"); in ZTEST()
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/os_mgmt_datetime/src/
Dmain.c91 bool ok; in mcumgr_ret_decode() local
103 ok = zcbor_map_decode_bulk(state, output_decode, ARRAY_SIZE(output_decode), &decoded) == 0; in mcumgr_ret_decode()
105 if (ok && in mcumgr_ret_decode()
113 return ok; in mcumgr_ret_decode()
150 bool ok; in ZTEST() local
173 ok = create_mcumgr_datetime_get_packet(zse, false, buffer, buffer_out, &buffer_size); in ZTEST()
174 zassert_true(ok, "Expected packet creation to be successful"); in ZTEST()
196 ok = zcbor_map_decode_bulk(zsd, output_decode, ARRAY_SIZE(output_decode), &decoded) == 0; in ZTEST()
197 zassert_true(ok, "Expected decode to be successful"); in ZTEST()
212 bool ok; in ZTEST() local
[all …]
Dsmp_test_util.c34 bool ok; in create_mcumgr_datetime_get_packet() local
36 ok = zcbor_map_start_encode(zse, 2) && in create_mcumgr_datetime_get_packet()
44 return ok; in create_mcumgr_datetime_get_packet()
52 bool ok = zcbor_map_start_encode(zse, 2) && in create_mcumgr_datetime_set_packet_str() local
62 return ok; in create_mcumgr_datetime_set_packet_str()
/Zephyr-latest/subsys/mgmt/mcumgr/grp/os_mgmt/src/
Dos_mgmt.c80 bool ok; member
149 bool ok; in os_mgmt_echo() local
159 ok = zcbor_map_decode_bulk(zsd, echo_decode, ARRAY_SIZE(echo_decode), &decoded) == 0; in os_mgmt_echo()
161 if (!ok) { in os_mgmt_echo()
165 ok = zcbor_tstr_put_lit(zse, "r") && in os_mgmt_echo()
168 return ok ? MGMT_ERR_EOK : MGMT_ERR_EMSGSIZE; in os_mgmt_echo()
220 bool ok = true; in os_mgmt_taskstat_encode_stack_info() local
233 ok = zcbor_tstr_put_lit(zse, "stksiz") && in os_mgmt_taskstat_encode_stack_info()
238 return ok; in os_mgmt_taskstat_encode_stack_info()
248 bool ok = true; in os_mgmt_taskstat_encode_runtime_info() local
[all …]
/Zephyr-latest/subsys/mgmt/mcumgr/grp/img_mgmt/src/
Dimg_mgmt.c146 bool ok = true; in img_mgmt_slot_max_size() local
154 ok = zcbor_tstr_put_lit(zse, "max_image_size") && in img_mgmt_slot_max_size()
159 return ok; in img_mgmt_slot_max_size()
164 bool ok = true; in img_mgmt_slot_max_size() local
175 ok = zcbor_tstr_put_lit(zse, "max_image_size") && in img_mgmt_slot_max_size()
179 return ok; in img_mgmt_slot_max_size()
415 bool ok; in img_mgmt_erase() local
423 ok = zcbor_map_decode_bulk(zsd, image_erase_decode, in img_mgmt_erase()
426 if (!ok) { in img_mgmt_erase()
442 ok = smp_add_cmd_err(zse, MGMT_GROUP_ID_IMAGE, in img_mgmt_erase()
[all …]
Dimg_mgmt_state.c421 bool ok; in img_mgmt_state_encode_slot() local
428 .ok = &ok, in img_mgmt_state_encode_slot()
442 ok = zcbor_map_start_encode(zse, CONFIG_MCUMGR_GRP_IMG_IMAGE_SLOT_STATE_STATES) && in img_mgmt_state_encode_slot()
450 if (ok) { in img_mgmt_state_encode_slot()
452 ok = zcbor_tstr_put_lit(zse, "<\?\?\?>"); in img_mgmt_state_encode_slot()
455 ok = zcbor_tstr_put_term(zse, vers_str, sizeof(vers_str)); in img_mgmt_state_encode_slot()
459 ok = ok && zcbor_tstr_put_lit(zse, "hash") && in img_mgmt_state_encode_slot()
467 if (!ok) { in img_mgmt_state_encode_slot()
477 ok &= zcbor_map_end_encode(zse, CONFIG_MCUMGR_GRP_IMG_IMAGE_SLOT_STATE_STATES); in img_mgmt_state_encode_slot()
480 return ok; in img_mgmt_state_encode_slot()
[all …]
/Zephyr-latest/subsys/mgmt/mcumgr/grp/img_mgmt_client/src/
Dimg_mgmt_client.c54 bool bootable, pending, confirmed, active, permanent, ok; in image_state_res_fn() local
79 ok = zcbor_map_start_decode(zsd); in image_state_res_fn()
80 if (!ok) { in image_state_res_fn()
85 ok = zcbor_tstr_decode(zsd, &value); in image_state_res_fn()
86 if (!ok) { in image_state_res_fn()
95 ok = zcbor_list_start_decode(zsd); in image_state_res_fn()
96 if (!ok) { in image_state_res_fn()
170 ok = zcbor_list_end_decode(zsd); in image_state_res_fn()
171 if (!ok) { in image_state_res_fn()
253 bool ok; in upload_message_header_size() local
[all …]
/Zephyr-latest/subsys/mgmt/mcumgr/util/src/
Dzcbor_bulk.c18 bool ok; in zcbor_map_decode_bulk() local
26 ok = true; in zcbor_map_decode_bulk()
33 ok = zcbor_tstr_decode(zsd, &key); in zcbor_map_decode_bulk()
35 while (ok && map_count < map_size) { in zcbor_map_decode_bulk()
66 if (!found && ok) { in zcbor_map_decode_bulk()
67 ok = zcbor_any_skip(zsd, NULL); in zcbor_map_decode_bulk()
69 } while (ok); in zcbor_map_decode_bulk()
/Zephyr-latest/tests/subsys/mgmt/mcumgr/smp_version/src/
Dmain.c75 bool ok; in mcumgr_ret_decode() local
87 ok = zcbor_map_decode_bulk(state, output_decode, ARRAY_SIZE(output_decode), &decoded) == 0; in mcumgr_ret_decode()
89 if (ok && in mcumgr_ret_decode()
97 return ok; in mcumgr_ret_decode()
104 bool ok; in ZTEST() local
129 ok = create_mcumgr_format_packet(zse, query_fake, buffer, buffer_out, &buffer_size, in ZTEST()
131 zassert_true(ok, "Expected packet creation to be successful"); in ZTEST()
159 ok = zcbor_map_decode_bulk(zsd, output_decode, ARRAY_SIZE(output_decode), &decoded) == 0; in ZTEST()
161 zassert_true(ok, "Expected decode to be successful"); in ZTEST()
191 bool ok; in ZTEST() local
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/mcumgr_client/src/
Dimg_gr_stub.c45 bool ok; in img_upload_response() local
57 ok = zcbor_map_start_encode(zse, 4) && zcbor_tstr_put_lit(zse, "rc") && in img_upload_response()
62 ok = zcbor_map_start_encode(zse, 2) && zcbor_tstr_put_lit(zse, "off") && in img_upload_response()
67 if (!ok) { in img_upload_response()
78 bool ok; in img_fail_response() local
89 ok = zcbor_map_start_encode(zse, 2) && zcbor_tstr_put_lit(zse, "rc") && in img_fail_response()
91 if (!ok) { in img_fail_response()
102 bool ok; in img_read_response() local
112 ok = zcbor_map_start_encode(zse, 15) && zcbor_tstr_put_lit(zse, "images") && in img_read_response()
115 for (int i = 0; ok && i < count; i++) { in img_read_response()
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/img_mgmt_slot_info/src/
Dmain.c98 bool ok; in parse_slot_entries() local
118 ok = zcbor_map_decode_bulk(state, output_decode, ARRAY_SIZE(output_decode), in parse_slot_entries()
120 zassert_true(ok, "Expected decode to be successful"); in parse_slot_entries()
149 bool ok; in parse_images_entries() local
170 ok = zcbor_map_decode_bulk(state, output_decode, ARRAY_SIZE(output_decode), in parse_images_entries()
172 zassert_true(ok, "Expected decode to be successful"); in parse_images_entries()
199 bool ok; in ZTEST() local
221 ok = create_img_mgmt_slot_info_packet(zse, buffer, buffer_out, &buffer_size); in ZTEST()
222 zassert_true(ok, "Expected packet creation to be successful"); in ZTEST()
253 ok = zcbor_map_decode_bulk(zsd, output_decode, ARRAY_SIZE(output_decode), &decoded) == 0; in ZTEST()
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/zcbor_bulk/src/
Dmain.c45 bool ok; in ZTEST() local
55 ok = zcbor_map_start_encode(zsd, 10) && in ZTEST()
61 zassert_true(ok, "Expected to be successful in encoding test pattern"); in ZTEST()
86 bool ok; in ZTEST() local
96 ok = zcbor_map_start_encode(zsd, 10) && in ZTEST()
102 zassert_true(ok, "Expected to be successful in encoding test pattern"); in ZTEST()
127 bool ok; in ZTEST() local
137 ok = zcbor_list_start_encode(zsd, 10) && in ZTEST()
141 zassert_true(ok, "Expected to be successful in encoding test pattern"); in ZTEST()
159 bool ok; in ZTEST() local
[all …]
/Zephyr-latest/tests/kernel/mem_protect/stackprot/
DREADME.txt45 main: Stack ok
46 main: Stack ok
47 main: Stack ok
48 main: Stack ok
49 main: Stack ok
50 main: Stack ok
/Zephyr-latest/tests/subsys/mgmt/mcumgr/cb_notifications/src/
Dmain.c101 bool ok; in ZTEST() local
115 ok = create_mcumgr_format_packet(zse, buffer, buffer_out, &buffer_size); in ZTEST()
116 zassert_true(ok, "Expected packet creation to be successful\n"); in ZTEST()
147 bool ok; in ZTEST() local
161 ok = create_mcumgr_format_packet(zse, buffer, buffer_out, &buffer_size); in ZTEST()
162 zassert_true(ok, "Expected packet creation to be successful\n"); in ZTEST()
193 bool ok; in ZTEST() local
207 ok = create_mcumgr_format_packet(zse, buffer, buffer_out, &buffer_size); in ZTEST()
208 zassert_true(ok, "Expected packet creation to be successful\n"); in ZTEST()

1234