<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/test/ut.h, branch master</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: document ut.h</title>
<updated>2025-11-21T18:25:56+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-11-18T20:17:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8d18eac76d35b873da326a5ea9b3d73a30cde230'/>
<id>8d18eac76d35b873da326a5ea9b3d73a30cde230</id>
<content type='text'>
Add missing Sphinx comments in include/test/ut.h

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add missing Sphinx comments in include/test/ut.h

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Move stat-printing into its own function</title>
<updated>2025-01-24T20:34:41+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-01-20T21:26:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=15c39587cf8a977df33aba37715b6ce3e17536d7'/>
<id>15c39587cf8a977df33aba37715b6ce3e17536d7</id>
<content type='text'>
Add a function to show the stats, so we can decide when to print it.

This slightly adjusts the output, so that any 'test not found' message
appears on its own line after all other output.

The 'failures' message now appears in lower case so update pytest
accordingly.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a function to show the stats, so we can decide when to print it.

This slightly adjusts the output, so that any 'test not found' message
appears on its own line after all other output.

The 'failures' message now appears in lower case so update pytest
accordingly.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Pass the test-state into ut_run_list()</title>
<updated>2025-01-24T20:34:39+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-01-20T21:25:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=94b5284398e52c44bde977aa8b1fa1f5992955a2'/>
<id>94b5284398e52c44bde977aa8b1fa1f5992955a2</id>
<content type='text'>
Pass this into the function so that callers can inspect the state
afterwards.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pass this into the function so that callers can inspect the state
afterwards.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Rename test_get_state() to ut_get_state()</title>
<updated>2025-01-24T20:34:39+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-01-20T21:25:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=238ba333c369b6cc521527e0783e6ac24368569f'/>
<id>238ba333c369b6cc521527e0783e6ac24368569f</id>
<content type='text'>
Rename this function and test_set_state() so use the same ut_ prefix as
other functions in ut.h

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename this function and test_set_state() so use the same ut_ prefix as
other functions in ut.h

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Rename unit-test flags</title>
<updated>2024-08-27T00:51:48+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-08-22T13:57:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=725c438c6271f1870636f61a68d6904dc27a1357'/>
<id>725c438c6271f1870636f61a68d6904dc27a1357</id>
<content type='text'>
The UT_TESTF_ macros read as 'unit test test flags' which is not right.
Rename to UTF ('unit test flags').

This has the benefit of being shorter, which helps keep UNIT_TEST()
declarations on a single line.

Give the enum a name and reference it from the UNIT_TEST() macros while
we are here.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The UT_TESTF_ macros read as 'unit test test flags' which is not right.
Rename to UTF ('unit test flags').

This has the benefit of being shorter, which helps keep UNIT_TEST()
declarations on a single line.

Give the enum a name and reference it from the UNIT_TEST() macros while
we are here.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Add helper to skip to partial console line</title>
<updated>2023-12-13T23:39:05+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-10-02T01:15:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=30a75e77946b8b2f4ed26e207bba3e4828629fee'/>
<id>30a75e77946b8b2f4ed26e207bba3e4828629fee</id>
<content type='text'>
Sometimes we need to skip to a line but it includes addresses or other
information which can vary depending on the runtime conditions.

Add a new ut_assert_skip_to_linen() which is similar to the existing
ut_assert_skip_to_line() function but only checks that the console line
matches up to the length of the provided string.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes we need to skip to a line but it includes addresses or other
information which can vary depending on the runtime conditions.

Add a new ut_assert_skip_to_linen() which is similar to the existing
ut_assert_skip_to_line() function but only checks that the console line
matches up to the length of the provided string.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Restore test behaviour on failure</title>
<updated>2023-07-14T16:54:50+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-06-01T16:22:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=18030d9fa225569cc0ff3e87baca52c6e2558e91'/>
<id>18030d9fa225569cc0ff3e87baca52c6e2558e91</id>
<content type='text'>
A recent change makes test continue to run after failure. This results in
a lot of useless output and may lead to a segfault. Fix this by adding
back the 'return' statement.

Fixes: fa847bb409d ("test: Wrap assert macros in ({ ... }) and fix")

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A recent change makes test continue to run after failure. This results in
a lot of useless output and may lead to a segfault. Fix this by adding
back the 'return' statement.

Fixes: fa847bb409d ("test: Wrap assert macros in ({ ... }) and fix")

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Wrap assert macros in ({ ... }) and fix missing semicolons</title>
<updated>2023-03-14T22:08:51+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2023-03-10T03:33:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fa847bb409d6a07bbd923e7889b485e943d75689'/>
<id>fa847bb409d6a07bbd923e7889b485e943d75689</id>
<content type='text'>
Wrap the assert macros in ({ ... }) so they can be safely used both as
right side argument as well as in conditionals without curly brackets
around them. In the process, find a bunch of missing semicolons, fix
them.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Wrap the assert macros in ({ ... }) so they can be safely used both as
right side argument as well as in conditionals without curly brackets
around them. In the process, find a bunch of missing semicolons, fix
them.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Add ut_assert_nextline_empty() empty line helper</title>
<updated>2023-03-08T19:40:57+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2023-03-02T03:08:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8f4c9993c05d22ec5ba86c9fb8526ea65b847281'/>
<id>8f4c9993c05d22ec5ba86c9fb8526ea65b847281</id>
<content type='text'>
Add helper macro to test for empty lines, which is an inobvious
wrapper around ut_assert_nextline("%s", "") .

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add helper macro to test for empty lines, which is an inobvious
wrapper around ut_assert_nextline("%s", "") .

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Add a way to detect a test that breaks another</title>
<updated>2022-11-07T23:24:30+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-10-30T01:47:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d1b46595700b063faaec3e33f5754642e68b3d8f'/>
<id>d1b46595700b063faaec3e33f5754642e68b3d8f</id>
<content type='text'>
When running unit tests, some may have side effects which cause a
subsequent test to break. This can sometimes be seen when using 'ut dm'
or similar.

Add a new argument which allows a particular (failing) test to be run
immediately after a certain number of tests have run. This allows the
test causing the failure to be determined.

Update the documentation also.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running unit tests, some may have side effects which cause a
subsequent test to break. This can sometimes be seen when using 'ut dm'
or similar.

Add a new argument which allows a particular (failing) test to be run
immediately after a certain number of tests have run. This allows the
test causing the failure to be determined.

Update the documentation also.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
