[PATCH V5 0/4] cmd: env: select: Add output for available environment targets
Christoph Niedermaier
cniedermaier at dh-electronics.com
Fri Jul 18 19:05:58 CEST 2025
Add the "-l" parameter to the "env select" command to print the available
environment targets, convert all argument parsing in the file nvedit.c to
getopt() and check that with unit tests.
The first patch converts the parsing of arguments to getopt() for all env
commands. The second one avoids stopping unit test on console output
"## Error: ". The third one adds unit tests for checking the env command.
These were used to check the env commands before and after the conversion.
The fourth patch adds the actual new parameter "-l" for the "env select"
command.
Christoph Niedermaier (3):
cmd: nvedit: Convert the parsing of arguments to getopt()
test/py: Avoid stopping the test on console output "## Error: "
test: cmd: nvedit: Add basic unit tests
cmd: env: select: Add output for available environment targets
cmd/nvedit.c | 353 +++++++++--------
env/Kconfig | 1 +
env/env.c | 16 +
include/env.h | 7 +
test/cmd/Makefile | 1 +
test/cmd/nvedit.c | 857 ++++++++++++++++++++++++++++++++++++++++
test/cmd_ut.c | 2 +
test/py/console_base.py | 2 -
8 files changed, 1064 insertions(+), 175 deletions(-)
create mode 100644 test/cmd/nvedit.c
Signed-off-by: Christoph Niedermaier <cniedermaier at dh-electronics.com>
---
Cc: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Cc: Casey Connolly <casey.connolly at linaro.org>
Cc: Christian Marangi <ansuelsmth at gmail.com>
Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
Cc: Jerome Forissier <jerome.forissier at linaro.org>
Cc: Joe Hershberger <joe.hershberger at ni.com>
Cc: Marek Vasut <marex at denx.de>
Cc: Mattijs Korpershoek <mkorpershoek at kernel.org>
Cc: Michael Walle <mwalle at kernel.org>
Cc: Michal Simek <michal.simek at amd.com>
Cc: Patrick Delaunay <patrick.delaunay at foss.st.com>
Cc: Quentin Schulz <quentin.schulz at cherry.de>
Cc: Rasmus Villemoes <ravi at prevas.dk>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
Cc: Varadarajan Narayanan <quic_varada at quicinc.com>
Cc: "Vincent Stehlé" <vincent.stehle at arm.com>
Cc: Weijie Gao <weijie.gao at mediatek.com>
--
2.30.2
More information about the U-Boot
mailing list