diff options
author | Simon Glass | 2022-07-13 06:06:59 -0600 |
---|---|---|
committer | Simon Glass | 2022-07-26 02:30:56 -0600 |
commit | 747244840b647991844556284aacdb3857440861 (patch) | |
tree | d6f43333ce2926a4acc8b36316eed21ba42938b4 /include | |
parent | 281996110c1f42b5476e43040798cb38169b6119 (diff) |
fdt: Start a test for the fdt command
Add a basic test of the 'fdt addr' command, to kick things off.
This includes a new convenience function to run a command from a printf()
string.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/command.h | 10 | ||||
-rw-r--r-- | include/test/suites.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/command.h b/include/command.h index 0cf12fde396..44c91f655d4 100644 --- a/include/command.h +++ b/include/command.h @@ -258,6 +258,16 @@ int run_command(const char *cmd, int flag); int run_command_repeatable(const char *cmd, int flag); /** + * run_commandf() - Run a command created by a format string + * + * The command cannot be larger than 127 characters + * + * @fmt: printf() format string + * @...: Arguments to use (flag is always 0) + */ +int run_commandf(const char *fmt, ...); + +/** * Run a list of commands separated by ; or even \0 * * Note that if 'len' is not -1, then the command does not need to be nul diff --git a/include/test/suites.h b/include/test/suites.h index ddb8827fdb1..44025ccecd6 100644 --- a/include/test/suites.h +++ b/include/test/suites.h @@ -38,6 +38,7 @@ int do_ut_compression(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_ut_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_lib(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_loadm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_log(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); |