Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/subsys/mgmt/mcumgr/os_mgmt_echo/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ZTEST(os_mgmt_echo, test_echo)
smp_dummy_disable();

zassert_equal(sizeof(expected_response), nb->len,
"Expected to receive %d bytes but got %d\n", sizeof(expected_response),
"Expected to receive %zu bytes but got %d\n", sizeof(expected_response),
nb->len);

zassert_mem_equal(expected_response, nb->data, nb->len,
Expand Down
6 changes: 3 additions & 3 deletions tests/subsys/mgmt/mcumgr/os_mgmt_info/src/build_date.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ ZTEST(os_mgmt_info_build_date, test_info_build_date_1_build_date)
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal(strlen(test_date_time), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
strlen(test_date_time), output.len);

/* Check left and right sides of date which should match */
Expand Down Expand Up @@ -208,7 +208,7 @@ ZTEST(os_mgmt_info_build_date, test_info_build_date_2_all)
/* Check with board revision */
zassert_equal((strlen(test_date_time) + strlen(response_all_board_revision_left) +
strlen(response_all_board_revision_right)), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(strlen(test_date_time) + strlen(response_all_board_revision_left) +
strlen(response_all_board_revision_right)), output.len);

Expand All @@ -224,7 +224,7 @@ ZTEST(os_mgmt_info_build_date, test_info_build_date_2_all)
/* Check without board revision */
zassert_equal((strlen(test_date_time) + strlen(response_all_left) +
strlen(response_all_right)), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(strlen(test_date_time) + strlen(response_all_left) +
strlen(response_all_right)), output.len);

Expand Down
4 changes: 2 additions & 2 deletions tests/subsys/mgmt/mcumgr/os_mgmt_info/src/limited.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ ZTEST(os_mgmt_info_limited, test_info_1_kernel_name)
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal((sizeof(response_kernel_name) - 1), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_kernel_name) - 1), output.len);

zassert_mem_equal(response_kernel_name, output.value, output.len,
Expand Down Expand Up @@ -160,7 +160,7 @@ ZTEST(os_mgmt_info_limited, test_info_2_all)

zassert_true(ok, "Expected decode to be successful\n");
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");
zassert_equal(output.len, 0, "Expected to receive 0 bytes but got %d\n", output.len);
zassert_equal(output.len, 0, "Expected to receive 0 bytes but got %zu\n", output.len);
zassert_equal(rc, MGMT_ERR_EMSGSIZE, "Expected to receive EMSGSIZE error but got %d\n",
rc);
}
Expand Down
48 changes: 24 additions & 24 deletions tests/subsys/mgmt/mcumgr/os_mgmt_info/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ ZTEST(os_mgmt_info, test_info_1)
smp_dummy_disable();

zassert_equal(sizeof(expected_response), nb->len,
"Expected to receive %d bytes but got %d\n", sizeof(expected_response),
"Expected to receive %zu bytes but got %d\n", sizeof(expected_response),
nb->len);

zassert_mem_equal(expected_response, nb->data, nb->len,
Expand Down Expand Up @@ -285,7 +285,7 @@ ZTEST(os_mgmt_info, test_info_1)
smp_dummy_disable();

zassert_equal(sizeof(expected_response), nb->len,
"Expected to receive %d bytes but got %d\n", sizeof(expected_response),
"Expected to receive %zu bytes but got %d\n", sizeof(expected_response),
nb->len);

zassert_mem_equal(expected_response, nb->data, nb->len,
Expand Down Expand Up @@ -346,7 +346,7 @@ ZTEST(os_mgmt_info, test_info_2_kernel_name)
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal((sizeof(response_kernel_name) - 1), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_kernel_name) - 1), output.len);

zassert_mem_equal(response_kernel_name, output.value, output.len,
Expand Down Expand Up @@ -407,7 +407,7 @@ ZTEST(os_mgmt_info, test_info_3_node_name)
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal((sizeof(response_node_name) - 1), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_node_name) - 1), output.len);

zassert_mem_equal(response_node_name, output.value, output.len,
Expand Down Expand Up @@ -469,7 +469,7 @@ ZTEST(os_mgmt_info, test_info_4_kernel_release)
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal((sizeof(response_kernel_release) - 1), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_kernel_release) - 1), output.len);

zassert_mem_equal(response_kernel_release, output.value, output.len,
Expand Down Expand Up @@ -531,7 +531,7 @@ ZTEST(os_mgmt_info, test_info_5_kernel_version)
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal((sizeof(response_kernel_version) - 1), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_kernel_version) - 1), output.len);

zassert_mem_equal(response_kernel_version, output.value, output.len,
Expand Down Expand Up @@ -592,8 +592,8 @@ ZTEST(os_mgmt_info, test_info_6_machine)
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal((sizeof(response_machine) - 1), output.len,
"Expected to receive %d bytes but got %d\n", (sizeof(response_machine) - 1),
output.len);
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_machine) - 1), output.len);

zassert_mem_equal(response_machine, output.value, output.len,
"Expected received data mismatch");
Expand Down Expand Up @@ -653,8 +653,8 @@ ZTEST(os_mgmt_info, test_info_7_processor)
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal((sizeof(response_processor) - 1), output.len,
"Expected to receive %d bytes but got %d\n", (sizeof(response_processor) - 1),
output.len);
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_processor) - 1), output.len);

zassert_mem_equal(response_processor, output.value, output.len,
"Expected received data mismatch");
Expand Down Expand Up @@ -716,15 +716,15 @@ ZTEST(os_mgmt_info, test_info_8_platform)
if (sizeof(CONFIG_BOARD_REVISION) > 1) {
/* Check with board revision */
zassert_equal((sizeof(response_board_revision) - 1), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_board_revision) - 1), output.len);

zassert_mem_equal(response_board_revision, output.value, output.len,
"Expected received data mismatch");
} else {
/* Check without board revision */
zassert_equal((sizeof(response_board) - 1), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_board) - 1), output.len);

zassert_mem_equal(response_board, output.value, output.len,
Expand Down Expand Up @@ -786,7 +786,7 @@ ZTEST(os_mgmt_info, test_info_9_os)
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal((sizeof(response_os) - 1), output.len,
"Expected to receive %d bytes but got %d\n", (sizeof(response_os) - 1),
"Expected to receive %zu bytes but got %zu\n", (sizeof(response_os) - 1),
output.len);

zassert_mem_equal(response_os, output.value, output.len,
Expand Down Expand Up @@ -849,15 +849,15 @@ ZTEST(os_mgmt_info, test_info_10_all)
if (sizeof(CONFIG_BOARD_REVISION) > 1) {
/* Check with board revision */
zassert_equal((sizeof(response_all_board_revision) - 1), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_all_board_revision) - 1), output.len);

zassert_mem_equal(response_all_board_revision, output.value, output.len,
"Expected received data mismatch");
} else {
/* Check without board revision */
zassert_equal((sizeof(response_all) - 1), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_all) - 1), output.len);

zassert_mem_equal(response_all, output.value, output.len,
Expand Down Expand Up @@ -924,7 +924,7 @@ ZTEST(os_mgmt_info, test_info_11_multi_1)
/* Construct expected response to be compared against */
sprintf(buffer, "%s %s %s", response_kernel_release, response_processor, response_os);

zassert_equal(strlen(buffer), output.len, "Expected to receive %d bytes but got %d\n",
zassert_equal(strlen(buffer), output.len, "Expected to receive %zu bytes but got %zu\n",
strlen(buffer), output.len);

zassert_mem_equal(buffer, output.value, output.len, "Expected received data mismatch");
Expand Down Expand Up @@ -991,7 +991,7 @@ ZTEST(os_mgmt_info, test_info_12_multi_2)
*/
sprintf(buffer, "%s %s", response_node_name, response_kernel_version);

zassert_equal(strlen(buffer), output.len, "Expected to receive %d bytes but got %d\n",
zassert_equal(strlen(buffer), output.len, "Expected to receive %zu bytes but got %zu\n",
strlen(buffer), output.len);

zassert_mem_equal(buffer, output.value, output.len, "Expected received data mismatch");
Expand Down Expand Up @@ -1064,7 +1064,7 @@ ZTEST(os_mgmt_info, test_info_13_invalid_1)

zassert_true(ok, "Expected decode to be successful\n");
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");
zassert_equal(output.len, 0, "Expected to receive 0 bytes but got %d\n", output.len);
zassert_equal(output.len, 0, "Expected to receive 0 bytes but got %zu\n", output.len);
zassert_equal(rc, MGMT_ERR_EINVAL, "Expected to receive EINVAL error but got %d\n", rc);
}

Expand Down Expand Up @@ -1135,7 +1135,7 @@ ZTEST(os_mgmt_info, test_info_14_invalid_2)

zassert_true(ok, "Expected decode to be successful\n");
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");
zassert_equal(output.len, 0, "Expected to receive 0 bytes but got %d\n", output.len);
zassert_equal(output.len, 0, "Expected to receive 0 bytes but got %zu\n", output.len);
zassert_equal(rc, MGMT_ERR_EINVAL, "Expected to receive EINVAL error but got %d\n", rc);
}

Expand Down Expand Up @@ -1207,7 +1207,7 @@ ZTEST(os_mgmt_info_custom_os, test_info_os_custom)
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal((sizeof(response_os_custom) - 1), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_os_custom) - 1), output.len);

zassert_mem_equal(response_os_custom, output.value, output.len,
Expand Down Expand Up @@ -1268,7 +1268,7 @@ ZTEST(os_mgmt_info_custom_os_disabled, test_info_os_custom_disabled)
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal((sizeof(response_os) - 1), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_os) - 1), output.len);

zassert_mem_equal(response_os, output.value, output.len,
Expand Down Expand Up @@ -1341,7 +1341,7 @@ ZTEST(os_mgmt_info_custom_cmd, test_info_cmd_custom)
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal((sizeof(response_custom_cmd) - 1), output.len,
"Expected to receive %d bytes but got %d\n",
"Expected to receive %zu bytes but got %zu\n",
(sizeof(response_custom_cmd) - 1), output.len);

zassert_mem_equal(response_custom_cmd, output.value, output.len,
Expand Down Expand Up @@ -1412,7 +1412,7 @@ ZTEST(os_mgmt_info_custom_cmd_disabled, test_info_cmd_custom_disabled)
zassert_true(ok, "Expected decode to be successful\n");
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal(output.len, 0, "Expected to receive 0 bytes but got %d\n", output.len);
zassert_equal(output.len, 0, "Expected to receive 0 bytes but got %zu\n", output.len);

zassert_equal(rc, MGMT_ERR_EINVAL, "Expected to receive EINVAL error but got %d\n", rc);
}
Expand Down Expand Up @@ -1481,7 +1481,7 @@ ZTEST(os_mgmt_info_custom_cmd_disabled_verify, test_info_cmd_custom_disabled)
zassert_true(ok, "Expected decode to be successful\n");
zassert_equal(decoded, 1, "Expected to receive 1 decoded zcbor element\n");

zassert_equal(output.len, 0, "Expected to receive 0 bytes but got %d\n", output.len);
zassert_equal(output.len, 0, "Expected to receive 0 bytes but got %zu\n", output.len);

zassert_equal(rc, MGMT_ERR_EINVAL, "Expected to receive EINVAL error but got %d\n", rc);

Expand Down