<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/test/hush, branch next</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/test/hush?h=next</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/test/hush?h=next'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2026-08-11T18:36:22Z</updated>
<entry>
<title>test: hush: Test hush negation</title>
<updated>2026-08-11T18:36:22Z</updated>
<author>
<name>Anshul Dalal</name>
<email>anshuld@ti.com</email>
</author>
<published>2026-07-28T05:17:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d9299ff33c849e1593d41dca580a3422da13dd6d'/>
<id>urn:sha1:d9299ff33c849e1593d41dca580a3422da13dd6d</id>
<content type='text'>
This unit test verifies negation in modern hush shell. To test on
sandbox, run the following commands with CONFIG_HUSH_MODERN_PARSER
enabled.

  =&gt; cli set modern
  =&gt; ut hush
  Test: negation: modern.c

Signed-off-by: Anshul Dalal &lt;anshuld@ti.com&gt;
</content>
</entry>
<entry>
<title>cmd: test: add bug-compatibility special case for 'test -n'</title>
<updated>2026-04-02T22:00:29Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>ravi@prevas.dk</email>
</author>
<published>2026-03-30T14:01:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f7e7c55e53e80100c327b9cb0512c069acf80ab5'/>
<id>urn:sha1:f7e7c55e53e80100c327b9cb0512c069acf80ab5</id>
<content type='text'>
It turns out that there is lots of code in the wild, including in the
U-Boot tree itself, which used to rely on

  test -n $somevar

to yield false when $somevar is not defined or empty. See for example
all the occurrences of 'test -n $fdtfile'. That was really only a
quirk of the implementation that refused calls with argc &lt; 3, and not
because it was interpreted as

  test -n "$somevar"

which is how this should be spelled.

While not exactly conforming to POSIX, we can accomodate such scripts
by special-casing a single argument "-n" to be interpreted as if it
comes from code as above with empty $somevar.

Since we only just added the ability to test a string for emptiness
using the single-argument form, it is very unlikely that there is code
doing

  test "$str"

which would now fail if $str happens to be exactly "-n"; such a test
should really always be spelled

  test -n "$str"

Fixes: 8b0619579b2 ("cmd: test: fix handling of single-argument form of test")
Reported-by: Franz Schnyder &lt;franz.schnyder@toradex.com&gt;
Signed-off-by: Rasmus Villemoes &lt;ravi@prevas.dk&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cmd: test: fix handling of single-argument form of test</title>
<updated>2026-03-25T20:37:55Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>ravi@prevas.dk</email>
</author>
<published>2026-03-12T10:01:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8b0619579b2282050e7fb0d92fbc645b79d18bae'/>
<id>urn:sha1:8b0619579b2282050e7fb0d92fbc645b79d18bae</id>
<content type='text'>
POSIX states that

  0 arguments:
      Exit false (1).
  1 argument:
      Exit true (0) if $1 is not null; otherwise, exit false.

and at least bash and busybox sh behave that way.

The current 'argc &lt; 3' does the right thing for a non-existing or
empty argv[1], but not for a non-empty argv[1]. Fix that and add
corresponding test cases.

Signed-off-by: Rasmus Villemoes &lt;ravi@prevas.dk&gt;
Tested-by: Anshul Dalal &lt;anshuld@ti.com&gt;
</content>
</entry>
<entry>
<title>test: add tests for left-bracket alias for 'test' command</title>
<updated>2026-03-25T20:37:55Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>ravi@prevas.dk</email>
</author>
<published>2026-03-12T10:01:05Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6f9cc3310a764aaae4478b5a8a0c0cae3b2be4a1'/>
<id>urn:sha1:6f9cc3310a764aaae4478b5a8a0c0cae3b2be4a1</id>
<content type='text'>
Duplicate a few of the existing test cases, using the [ spelling, and
also ensure that the presence of a matching ] as a separate and last
argument is enforced.

Signed-off-by: Rasmus Villemoes &lt;ravi@prevas.dk&gt;
Tested-by: Anshul Dalal &lt;anshuld@ti.com&gt;
</content>
</entry>
<entry>
<title>global: Avoid indirect inclusion of &lt;env.h&gt; from &lt;command.h&gt;</title>
<updated>2025-05-29T14:29:16Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-05-14T22:46:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dcb7d927d181b5798c6fd4a1b1650cd821e3b6ed'/>
<id>urn:sha1:dcb7d927d181b5798c6fd4a1b1650cd821e3b6ed</id>
<content type='text'>
The include file &lt;command.h&gt; does not need anything from &lt;env.h&gt;.
Furthermore, include/env.h itself includes other headers which can lead
to longer indirect inclusion paths. To prepare to remove &lt;env.h&gt; from
&lt;command.h&gt; fix all of the places which had relied on this indirect
inclusion to instead include &lt;env.h&gt; directly.

Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@kernel.org&gt; # android, bcb
Reviewed-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt; # spawn
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>test: Drop the function for running hush tests</title>
<updated>2025-01-24T20:34:40Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-01-20T21:25:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d5e5cb48e646ef089b57a4d924796b153f73fbfd'/>
<id>urn:sha1:d5e5cb48e646ef089b57a4d924796b153f73fbfd</id>
<content type='text'>
Use the new suite-runner to run these tests instead.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>test: Drop the _test suffix on linker lists</title>
<updated>2025-01-24T20:34:40Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-01-20T21:25:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4ba3ab4901c564725c37e927e2ba29595712cd9d'/>
<id>urn:sha1:4ba3ab4901c564725c37e927e2ba29595712cd9d</id>
<content type='text'>
Most test suites have a _test suffix. This is not necessary as there is
also a ut_ prefix.

Drop the suffix so that (with future work) the suite name can be used as
the linker-list name.

Remove the suffix from the pytest regex as well, moving it to the top of
the file, as it is a constant.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>test: Add newlines to hush-test messages</title>
<updated>2025-01-24T20:34:40Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-01-20T21:25:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ea2bb8e20f9759f98db93b24728ed478f06dc875'/>
<id>urn:sha1:ea2bb8e20f9759f98db93b24728ed478f06dc875</id>
<content type='text'>
A few messages lack a newline so the test output shows the next
test-name on the same line. For example:

   Beware: this test sets local variable dollar_bar and dollar_quux
      and they cannot be unset!Test: hush_test_env_dollar: dollar.c

This is confusing, so fix it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>test/hush: Add CONFIG_CONSOLE_RECORD where required</title>
<updated>2024-10-29T22:17:47Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2024-10-28T16:48:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2d42f7d9018a9c7bf7e65780d6505280a46c0cda'/>
<id>urn:sha1:2d42f7d9018a9c7bf7e65780d6505280a46c0cda</id>
<content type='text'>
The "dollar" tests require CONFIG_CONSOLE_RECORD to be enabled so guard
with that.

Reviewed-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>Merge patch series "Bump new hush commits and fix old hush test behavior"</title>
<updated>2024-09-13T19:44:00Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2024-09-13T19:44:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=979207ed6bac1b148802abb85750fc5e9cea223e'/>
<id>urn:sha1:979207ed6bac1b148802abb85750fc5e9cea223e</id>
<content type='text'>
Francis Laniel &lt;francis.laniel@amarulasolutions.com&gt; says:

Hi!

With this series, I bumped the new hush to get the latest commits from upstream.

Also, I added back a reverted commit which goal was to fix a bad behavior in
old hush test.
I had to tweak a bit this commit, but everything worked both locally and in the
CI.
</content>
</entry>
</feed>
