<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/test/cmd, branch v2025.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>test/cmd/wget.c: move net_test_wget() to the cmd test suite</title>
<updated>2024-11-29T13:51:57+00:00</updated>
<author>
<name>Jerome Forissier</name>
<email>jerome.forissier@linaro.org</email>
</author>
<published>2024-11-15T16:45:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=20f641987f83c4679a1181d79a546a098f11f5ad'/>
<id>20f641987f83c4679a1181d79a546a098f11f5ad</id>
<content type='text'>
Since net_test_wget() is testing a command and is in test/cmd it should
be in the 'cmd' test suite, not 'lib'.

Saving and restoring the values of the environment variables that the
test manipulates is necessary to avoid a regression when running the
whole ut test suite. A minimal reproducer is:

 $ ./u-boot -T -c "ut cmd net_test_wget; ut dm dm_test_eth_act" | \
     grep -E "(Test:|Failures:)"

Reported-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since net_test_wget() is testing a command and is in test/cmd it should
be in the 'cmd' test suite, not 'lib'.

Saving and restoring the values of the environment variables that the
test manipulates is necessary to avoid a regression when running the
whole ut test suite. A minimal reproducer is:

 $ ./u-boot -T -c "ut cmd net_test_wget; ut dm dm_test_eth_act" | \
     grep -E "(Test:|Failures:)"

Reported-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: cmd/hash: check return value of ut_check_console_line</title>
<updated>2024-11-19T01:10:56+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2024-11-16T20:08:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3d0da87cd4020f9e14a249c0e080341d668d9426'/>
<id>3d0da87cd4020f9e14a249c0e080341d668d9426</id>
<content type='text'>
ut_check_console_line() does include an assert.
Pass the result to ut_assertok().

Addresses-Coverity-ID:  514958 Error handling issues
Fixes: 7dfafcd65ef3 ("test: unit test for hash command")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ut_check_console_line() does include an assert.
Pass the result to ut_assertok().

Addresses-Coverity-ID:  514958 Error handling issues
Fixes: 7dfafcd65ef3 ("test: unit test for hash command")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lmb.c: add missing comma in lmb_dump_region()</title>
<updated>2024-11-15T00:14:06+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2024-11-07T10:14:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dfe7ab35147c2a2c8a63b2155227a86684d6dd4d'/>
<id>dfe7ab35147c2a2c8a63b2155227a86684d6dd4d</id>
<content type='text'>
In the message string " %s[%d]\t[0x%llx-0x%llx], 0x%08llx bytes flags: "
a comma is missing before flags.

To avoid increasing the code size replace '0x%' by '%#'.

Printing the size with leading zeros but not the addresses does not really
make sense. Remove the leading zeros from the size output.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
[trini: Fix test/cmd/bdinfo.c for these changes]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the message string " %s[%d]\t[0x%llx-0x%llx], 0x%08llx bytes flags: "
a comma is missing before flags.

To avoid increasing the code size replace '0x%' by '%#'.

Printing the size with leading zeros but not the addresses does not really
make sense. Remove the leading zeros from the size output.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
[trini: Fix test/cmd/bdinfo.c for these changes]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: use %zd for size_t in mbr_test_run()</title>
<updated>2024-11-15T00:14:06+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2024-11-03T22:48:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5430a5f67e5f73b0411d550b5dd6aa446a3b0299'/>
<id>5430a5f67e5f73b0411d550b5dd6aa446a3b0299</id>
<content type='text'>
For printing size_t we must use %zd and not %ld to avoid
a -Wformat error on 32-bit systems.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For printing size_t we must use %zd and not %ld to avoid
a -Wformat error on 32-bit systems.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: cmd/mbr: pass correct buffer size to init_write_buffers</title>
<updated>2024-11-15T00:14:06+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2024-11-02T15:41:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d8c5bcbd224fddd983f0796886409ede880d11ac'/>
<id>d8c5bcbd224fddd983f0796886409ede880d11ac</id>
<content type='text'>
We want to completely initialize the mbr and embr buffers. This requires
passing the buffer size and not the size of a pointer to the buffer.

Addresses-Coverity-ID: 510454 Wrong sizeof argument
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want to completely initialize the mbr and embr buffers. This requires
passing the buffer size and not the size of a pointer to the buffer.

Addresses-Coverity-ID: 510454 Wrong sizeof argument
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge patch series "cmd: hash: correct parameter count check"</title>
<updated>2024-11-14T16:49:51+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2024-11-14T16:49:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f6ee67126492f07d400d677e82467de3f8ad2bda'/>
<id>f6ee67126492f07d400d677e82467de3f8ad2bda</id>
<content type='text'>
Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt; says:

Since commit 348ea878508d ("cmd: hash: fix param count check") the hash
command cannot be used without the optional variable name parameter if
CONFIG_HASH_VERIFY=y. 'hash sha1 $loadaddr $filesize' returns
CMD_RET_USAGE.

The minimum number of arguments is four no matter if verification is
enabled or not.

Fix the parameter check.

Provide a unit test.

Link: https://lore.kernel.org/r/20241102100836.103005-1-heinrich.schuchardt@canonical.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt; says:

Since commit 348ea878508d ("cmd: hash: fix param count check") the hash
command cannot be used without the optional variable name parameter if
CONFIG_HASH_VERIFY=y. 'hash sha1 $loadaddr $filesize' returns
CMD_RET_USAGE.

The minimum number of arguments is four no matter if verification is
enabled or not.

Fix the parameter check.

Provide a unit test.

Link: https://lore.kernel.org/r/20241102100836.103005-1-heinrich.schuchardt@canonical.com
</pre>
</div>
</content>
</entry>
<entry>
<title>test: unit test for hash command</title>
<updated>2024-11-14T16:49:24+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2024-11-02T10:08:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7dfafcd65ef3dc0307a7752ac5a263eb2af56862'/>
<id>7dfafcd65ef3dc0307a7752ac5a263eb2af56862</id>
<content type='text'>
Provide a unit test testing the hash command.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a unit test testing the hash command.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge patch series "test: Tidy up the test/ directory"</title>
<updated>2024-11-13T22:02:58+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2024-11-13T17:59:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=aa482995a81aff8d9f063e777862f126771f9189'/>
<id>aa482995a81aff8d9f063e777862f126771f9189</id>
<content type='text'>
Simon Glass &lt;sjg@chromium.org&gt; says:

Some tests do not use the unit-test framework. Others are in a suite of
their own, for no obvious reason.

This series tidies this up.

Link: https://lore.kernel.org/r/20241102193715.432529-1-sjg@chromium.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simon Glass &lt;sjg@chromium.org&gt; says:

Some tests do not use the unit-test framework. Others are in a suite of
their own, for no obvious reason.

This series tidies this up.

Link: https://lore.kernel.org/r/20241102193715.432529-1-sjg@chromium.org
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Update command test to use unit-test functions</title>
<updated>2024-11-13T17:56:01+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-11-02T19:36:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ee3c8698e0908d881ce85fd82a26f2ac96978c71'/>
<id>ee3c8698e0908d881ce85fd82a26f2ac96978c71</id>
<content type='text'>
Rather than enabled DEBUG and using assert(), use the unit-test
functions now provided.

Drop a check that causes pytest to fail.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Tom Rini &lt;trini@konsulko.com&gt; # rpi_3, rpi_4, rpi_arm64, am64x_evm_a53, am64-sk
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than enabled DEBUG and using assert(), use the unit-test
functions now provided.

Drop a check that causes pytest to fail.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Tom Rini &lt;trini@konsulko.com&gt; # rpi_3, rpi_4, rpi_arm64, am64x_evm_a53, am64-sk
</pre>
</div>
</content>
</entry>
<entry>
<title>command: test: Move into the cmd suite</title>
<updated>2024-11-13T17:56:01+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-11-02T19:36:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c25b35b6c6da208621e0ac61e46a4fad4337c092'/>
<id>c25b35b6c6da208621e0ac61e46a4fad4337c092</id>
<content type='text'>
The command test was the very first test written in U-Boot, some 12
years ago. It predates the unit-test subsystem and was never converted
over.

There is no particular need for the command test to have its own
command. It is also confusing to have it separate from the normal test
suites. At present this test is not run in CI.

Move it into the cmd suite instead, updating it to become a unit test.
One of the checks is dropped to avoid an error.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Tom Rini &lt;trini@konsulko.com&gt; # rpi_3, rpi_4, rpi_arm64, am64x_evm_a53, am64-sk
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The command test was the very first test written in U-Boot, some 12
years ago. It predates the unit-test subsystem and was never converted
over.

There is no particular need for the command test to have its own
command. It is also confusing to have it separate from the normal test
suites. At present this test is not run in CI.

Move it into the cmd suite instead, updating it to become a unit test.
One of the checks is dropped to avoid an error.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Tom Rini &lt;trini@konsulko.com&gt; # rpi_3, rpi_4, rpi_arm64, am64x_evm_a53, am64-sk
</pre>
</div>
</content>
</entry>
</feed>
