]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Merge patch series "test: Quote variables in 'test -n' expressions across boards"
authorTom Rini <trini@konsulko.com>
Thu, 14 May 2026 21:39:22 +0000 (15:39 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 14 May 2026 21:39:22 +0000 (15:39 -0600)
Simon Glass <sjg@chromium.org> says:

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.

Commit 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

Link: https://lore.kernel.org/r/20260503204936.3151124-1-sjg@chromium.org

Trivial merge