[PATCH] board: toradex: Quote variables in `test` cmd expression

Tom Rini trini at konsulko.com
Mon May 4 22:36:11 CEST 2026


On Tue, 31 Mar 2026 10:10:10 +0200, Franz Schnyder wrote:

> With correct POSIX handling, unquoted empty variables can turn the
> expression like
> 	test -n ${fdtfile}
> into
> 	test -n
> 
> The POSIX handling for single argument `test` evaluates it as true,
> so the fallback initialization will be skipped unexpectedly.
> Quoting variable expansions in `test` expressions will always result in
> correct behavior for empty and non-empty values.
> This change was triggered by
> commit 8b0619579b22 ("cmd: test: fix handling of single-argument form of test")
> The aim is to have a less fragile codebase that is not dependent on a
> quirk of the shell implementation.
> 
> [...]

Applied to u-boot/master, thanks!

[1/1] board: toradex: Quote variables in `test` cmd expression
      commit: 92a04aea6df3e59942614864486bbd0f46d01682
-- 
Tom




More information about the U-Boot mailing list