U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] test: Quote variables in 'test -n' expressions across boards
@ 2026-05-03 20:49 Simon Glass
  2026-05-03 20:49 ` [PATCH 1/6] toradex: Quote fdtfile in preboot test Simon Glass
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Simon Glass @ 2026-05-03 20:49 UTC (permalink / raw)
  To: u-boot
  Cc: Simon Glass, Alice Guo, Andrew Davis, Anshul Dalal,
	Bryan Brattlof, Cyril Jean, Emanuele Ghidoli, Enrico Leto,
	Ernest Van Hoecke, Fabio Estevam, Francesco Dolcini,
	Franz Schnyder, Heiko Schocher, Hiago De Franco, Jaehoon Chung,
	Jamie Gibbons, Leo Yu-Chi Liang, Lukasz Majewski, Marek Vasut,
	Max Krummenacher, Parth Pancholi, Peng Fan, Rasmus Villemoes,
	Sam Protsenko, Siddharth Vadapalli, Tom Rini, Udit Kumar,
	Łukasz Majewski

Several boards use 'test -n ${var}' (unquoted) in env scripts to
detect an empty variable and trigger a fallback or skip a hook. That
works only because of a U-Boot 'test' quirk where calls with argc <
3 returned false; an empty variable made the expression 'test -n'
(one operand) and hit that path.

8b0619579b22 ("cmd: test: fix handling of single-argument form of
test") aligned 'test' with POSIX so those expressions flipped to
true.  f7e7c55e53e8 ("cmd: test: add bug-compatibility special case
for 'test -n'") restored the old behaviour for the exact 'test -n'
(one arg) case, so the boards are not broken at runtime today, but
the reliance on a bug-compat path isn't great.

This series updates various boards to quote each affected variable so
the emptiness check is explicit and does not depend on the
special-case path.

Each commit carries a Fixes: tag pointing at 8b0619579b22


Simon Glass (6):
  toradex: Quote fdtfile in preboot test
  ti: Quote board_init in ti_common.env
  siemens: Quote A/B flags in env tests
  beaglev_fire: Quote no_of_overlays in design test
  mccmon6: Quote recovery_status in bootcmd test
  aristainetos2: Quote rescue_reason in rescueboot test

 configs/apalis-imx8_defconfig          |  2 +-
 configs/apalis_imx6_defconfig          |  2 +-
 configs/colibri-imx6ull-emmc_defconfig |  2 +-
 configs/colibri-imx6ull_defconfig      |  2 +-
 configs/colibri-imx8x_defconfig        |  2 +-
 configs/colibri_imx6_defconfig         |  2 +-
 configs/colibri_imx7_defconfig         |  2 +-
 configs/colibri_imx7_emmc_defconfig    |  2 +-
 configs/colibri_vf_defconfig           |  2 +-
 configs/toradex-smarc-imx8mp_defconfig |  2 +-
 configs/toradex-smarc-imx95_defconfig  |  2 +-
 configs/verdin-am62_a53_defconfig      |  2 +-
 configs/verdin-am62p_a53_defconfig     |  2 +-
 configs/verdin-imx8mm_defconfig        |  2 +-
 configs/verdin-imx8mp_defconfig        |  2 +-
 include/configs/aristainetos2.h        |  2 +-
 include/configs/beaglev_fire.h         |  2 +-
 include/configs/draco-etamin.h         |  4 ++--
 include/configs/mccmon6.h              |  2 +-
 include/configs/siemens-am33x-common.h | 12 ++++++------
 include/configs/siemens-env-common.h   |  8 ++++----
 include/env/ti/ti_common.env           |  2 +-
 22 files changed, 31 insertions(+), 31 deletions(-)

---
base-commit: bb0f3eebb3c196d9b6efbbd1e5aa9b16abbb9ad6
branch: env-test-us

-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-05-14 23:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-03 20:49 [PATCH 0/6] test: Quote variables in 'test -n' expressions across boards Simon Glass
2026-05-03 20:49 ` [PATCH 1/6] toradex: Quote fdtfile in preboot test Simon Glass
2026-05-04  4:54   ` Francesco Dolcini
2026-05-04 12:15     ` Simon Glass
2026-05-03 20:49 ` [PATCH 2/6] ti: Quote board_init in ti_common.env Simon Glass
2026-05-03 20:49 ` [PATCH 3/6] siemens: Quote A/B flags in env tests Simon Glass
2026-05-03 20:49 ` [PATCH 4/6] beaglev_fire: Quote no_of_overlays in design test Simon Glass
2026-05-03 20:49 ` [PATCH 5/6] mccmon6: Quote recovery_status in bootcmd test Simon Glass
2026-05-04  6:34   ` Łukasz Majewski
2026-05-03 20:49 ` [PATCH 6/6] aristainetos2: Quote rescue_reason in rescueboot test Simon Glass
2026-05-04 12:54   ` Heiko Schocher
2026-05-14 23:15 ` (subset) [PATCH 0/6] test: Quote variables in 'test -n' expressions across boards Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox