[PATCH v2 0/4] cli: run_commandf() coverage and small fixups

Evgeny Bachinin EABachinin at sberdevices.ru
Mon Mar 20 09:23:10 CET 2023


Our company has been using custom variadic version of run_command()
since the beginning of the 2022Y. Recently, we had started upstreaming
activity and figured out, that similar functionality already exists.
Thanks, it's very helpful, because our code uses such variadic API.

Let me share test-cases for run_commandf() to improve coverage and
btw provide several fixups for run_commandf(), found during applying
this API to our custom sources.

Patchset has been tested on our set of devices and sandbox64
(appropriate unit-tests were checked: ut_cmd, ut fdt, ut exit).
Additionally, github CI loop has been passed successfully without
regression in context of github PR [1].

Changes v2 since v1 at [2]:
- rebase
- run_commandf: apply comments
- command_ut: re-write truncation test-case
- test/cmd/fdt.c: fix compilation after rebase

Links:
[1] https://github.com/u-boot/u-boot/pull/277/checks
[2] https://lore.kernel.org/u-boot/20230310185409.22254-1-EABachinin@sberdevices.ru/

Evgeny Bachinin (4):
  cli: run_commandf(): small fixups
  unit-test: cover run_commandf() by test-cases
  test: fdt: fix run_commandf() warnings
  test: exit: fix run_commandf() warnings

 common/cli.c      | 25 +++++++++++++++++++------
 include/command.h | 13 ++++++++++---
 test/cmd/exit.c   | 18 +++++++++---------
 test/cmd/fdt.c    | 16 ++++++++--------
 test/command_ut.c | 34 ++++++++++++++++++++++++++++++++++
 5 files changed, 80 insertions(+), 26 deletions(-)

-- 
2.17.1



More information about the U-Boot mailing list