]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
doc: describe return values of C tests
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 18 Nov 2025 20:17:33 +0000 (21:17 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 21 Nov 2025 18:25:56 +0000 (19:25 +0100)
* Enumerate return values of C tests
* Reference assertion macros

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
doc/develop/tests_writing.rst

index b6972489d4c4d717f9353bd65957654bae209a22..1a020caa411188311e0fc7bb9180e5f4ccd4e612 100644 (file)
@@ -228,6 +228,14 @@ Note that the MEM_TEST() macros is defined at the top of the file.
 
 Example commit: 9fe064646d2 ("bloblist: Support relocating to a larger space") [1]
 
+* A successful test returns 0.
+* A skipped test returns -EAGAIN.
+* Any other value signals a failure.
+
+Include ``test/ut.h`` defines a number of macros to check values and to return
+from the test function if the assertion fails. See :doc:`../api/test`
+for details.
+
 [1] https://gitlab.denx.de/u-boot/u-boot/-/commit/9fe064646d2