U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Evgeny Bachinin <EABachinin@sberdevices.ru>
To: Simon Glass <sjg@chromium.org>,
	Hector Palacios <hector.palacios@digi.com>,
	Marek Vasut <marex@denx.de>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	John Keeping <john@metanate.com>
Cc: <u-boot@lists.denx.de>, <kernel@sberdevices.ru>,
	<evgen89bachinin@gmail.com>,
	Evgeny Bachinin <EABachinin@sberdevices.ru>
Subject: [PATCH v2 0/4] cli: run_commandf() coverage and small fixups
Date: Mon, 20 Mar 2023 11:23:10 +0300	[thread overview]
Message-ID: <20230320082314.2018-1-EABachinin@sberdevices.ru> (raw)

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


             reply	other threads:[~2023-03-20  8:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20  8:23 Evgeny Bachinin [this message]
2023-03-20  8:23 ` [PATCH v2 1/4] cli: run_commandf(): small fixups Evgeny Bachinin
2023-03-20 18:40   ` Simon Glass
2023-03-31 14:15   ` Tom Rini
2023-03-20  8:23 ` [PATCH v2 2/4] unit-test: cover run_commandf() by test-cases Evgeny Bachinin
2023-03-20 18:40   ` Simon Glass
2023-03-31 14:15   ` Tom Rini
2023-03-20  8:23 ` [PATCH v2 3/4] test: fdt: fix run_commandf() warnings Evgeny Bachinin
2023-03-20 18:40   ` Simon Glass
2023-03-31 14:15   ` Tom Rini
2023-03-20  8:23 ` [PATCH v2 4/4] test: exit: " Evgeny Bachinin
2023-03-20 18:40   ` Simon Glass
2023-03-31 14:15   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230320082314.2018-1-EABachinin@sberdevices.ru \
    --to=eabachinin@sberdevices.ru \
    --cc=evgen89bachinin@gmail.com \
    --cc=hector.palacios@digi.com \
    --cc=john@metanate.com \
    --cc=kernel@sberdevices.ru \
    --cc=marex@denx.de \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox