diff options
Diffstat (limited to 'zephyr/test/drivers/default/src/console_cmd/ec_features.c')
-rw-r--r-- | zephyr/test/drivers/default/src/console_cmd/ec_features.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/zephyr/test/drivers/default/src/console_cmd/ec_features.c b/zephyr/test/drivers/default/src/console_cmd/ec_features.c index 48e6eec819..b33ca565bc 100644 --- a/zephyr/test/drivers/default/src/console_cmd/ec_features.c +++ b/zephyr/test/drivers/default/src/console_cmd/ec_features.c @@ -3,27 +3,23 @@ * found in the LICENSE file. */ -#include "builtin/stdio.h" +#include <zephyr/shell/shell.h> +#include <zephyr/ztest.h> + #include "console.h" #include "host_command.h" #include "test/drivers/test_state.h" #include "test/drivers/utils.h" -#include <zephyr/shell/shell.h> -#include <zephyr/ztest.h> - ZTEST_SUITE(console_cmd_ec_features, drivers_predicate_post_main, NULL, NULL, NULL, NULL); ZTEST_USER(console_cmd_ec_features, test_feat) { - char expected[50]; - int ret; + char expected[32]; - ret = snprintf(expected, sizeof(expected), - " 0-31: 0x%08x\r\n32-63: 0x%08x", get_feature_flags0(), - get_feature_flags1()); - zassert_true(ret >= 0 && ret < sizeof(expected)); + snprintf(expected, sizeof(expected), " 0-31: 0x%08x\r\n32-63: 0x%08x", + get_feature_flags0(), get_feature_flags1()); CHECK_CONSOLE_CMD("feat", expected, EC_SUCCESS); } |