mbox series

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

Message ID 20230320082314.2018-1-EABachinin@sberdevices.ru
Headers show
Series cli: run_commandf() coverage and small fixups | expand

Message

Evgeny Bachinin March 20, 2023, 8:23 a.m. UTC
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(-)