summaryrefslogtreecommitdiff
path: root/doc/develop/pytest
AgeCommit message (Collapse)Author
2026-04-27Merge patch series "net: migrate NO_NET out of the networking stack choice"Tom Rini
Quentin Schulz <[email protected]> says: This migrates the net options away from the main Kconfig to net/Kconfig, rename the current NET option to NET_LEGACY to really highlight what it is and hopefully encourage more people to use lwIP, add a new NET menuconfig (but keep NO_NET as an alias to NET=n for now) which then allows us to replace all the "if legacy_stack || lwip_stack" checks with "if net_support" which is easier to read and maintain. The only doubt I have is wrt SYS_RX_ETH_BUFFER which seems to be needed for now even when no network is configured? Likely due to include/net-common.h with PKTBUFSRX? No change in behavior is intended. Only change in defconfig including other defconfigs where NO_NET=y or NET is not set, in which case NO_NET is not set or NET=y should be set in the top defconfig. Similar change required for config fragments. See commit log in patch adding NET menuconfig for details. This was tested based on 70fd0c3bb7c2 ("x86: there is no CONFIG_UBOOT_ROMSIZE_KB_12288"), from within the GitLab CI container trini/u-boot-gitlab-ci-runner:noble-20251013-23Jan2026 and set up similarly as in "build all platforms in a single job" GitLab CI job. #!/usr/bin/env bash set -o pipefail set -eux ARGS="-BvelPEWM --reproducible-builds --step 0" ./tools/buildman/buildman -o ${O} --force-build $ARGS -CE $* ./tools/buildman/buildman -o ${O} $ARGS -Ssd $* O=../build/u-boot/ ../u-boot.sh -b master^..b4/net-kconfig |& tee ../log.txt I can't really decipher the log.txt, but there's no line starting with + which would be an error according to tools/buildman/builder.py help text. Additionally, because I started the script with set -e set and because buildman has an exit code != 0 when it fails to build a board, and I have the summary printed (which is the second buildman call), I believe it means all builds passed. The summary is the following: aarch64: (for 537/537 boards) all +0.0 rodata +0.0 uniphier_v8 : all +1 rodata +1 u-boot: add: 0/0, grow: 1/0 bytes: 1/0 (1) function old new delta data_gz 10640 10641 +1 arm: (for 733/733 boards) all -0.0 rodata -0.0 uniphier_v7 : all -1 rodata -1 u-boot: add: 0/0, grow: 0/-1 bytes: 0/-1 (-1) function old new delta data_gz 11919 11918 -1 opos6uldev : all -3 rodata -3 u-boot: add: 0/0, grow: 0/-1 bytes: 0/-3 (-3) function old new delta data_gz 18778 18775 -3 uniphier_ld4_sld8: all -3 rodata -3 u-boot: add: 0/0, grow: 0/-1 bytes: 0/-3 (-3) function old new delta data_gz 11276 11273 -3 stemmy : all -20 rodata -20 u-boot: add: 0/0, grow: 0/-1 bytes: 0/-20 (-20) function old new delta data_gz 15783 15763 -20 As far as I could tell this data_gz is an automatically generated array when CONFIG_CMD_CONFIG is enabled. It is the compressed .config stored in binary form. Because I'm changing the name of symbols, replacing a menu with a menuconfig, additional text makes it to .config and the "# Networking" section in .config disappears. Here is the diff for the 5 defconfigs listed above, generated with: for f in build/*-m; do diff --unified=0 $f/.config $(dirname $f)/$(basename -a -s '-m' $f)/.config done (-m is the build directory for master, and without the suffix, it's the top commit of this series) """ --- build/opos6uldev-m/.config 2026-04-20 10:53:49.804528526 +0200 +++ build/opos6uldev/.config 2026-04-20 11:03:37.430242767 +0200 @@ -970,4 +969,0 @@ - -# -# Networking -# @@ -975,0 +972 @@ +CONFIG_NET_LEGACY=y --- build/stemmy-m/.config 2026-04-20 11:01:33.653698123 +0200 +++ build/stemmy/.config 2026-04-20 11:04:53.452577311 +0200 @@ -733,4 +732,0 @@ - -# -# Networking -# @@ -738,2 +733,0 @@ -# CONFIG_NET is not set -# CONFIG_NET_LWIP is not set --- build/uniphier_ld4_sld8-m/.config 2026-04-20 11:00:41.605469071 +0200 +++ build/uniphier_ld4_sld8/.config 2026-04-20 11:04:22.226439899 +0200 @@ -997,4 +996,0 @@ - -# -# Networking -# @@ -1002,0 +999 @@ +CONFIG_NET_LEGACY=y --- build/uniphier_v7-m/.config 2026-04-20 10:53:04.019307319 +0200 +++ build/uniphier_v7/.config 2026-04-20 11:03:01.688085486 +0200 @@ -1004,4 +1003,0 @@ - -# -# Networking -# @@ -1009,0 +1006 @@ +CONFIG_NET_LEGACY=y --- build/uniphier_v8-m/.config 2026-04-20 10:43:05.614441175 +0200 +++ build/uniphier_v8/.config 2026-04-20 10:41:03.214852130 +0200 @@ -875,4 +874,0 @@ - -# -# Networking -# @@ -880,0 +877 @@ +CONFIG_NET_LEGACY=y """ This is fine: - Networking menu doesn't exist anymore so "#\n# Networking\n#\n" won't be in .config anymore. - opos6uldev, uniphier_ld4_sld8, uniphier_v7 and uniphier_v8 all have (old) CONFIG_NET enabled, (new) CONFIG_NET will still be set but CONFIG_NET_LEGACY also needs to be defined now to reflect the stack choice (even if default), - stemmy has CONFIG_NO_NET set, which means CONFIG_NET and CONFIG_NET_LWIP are not reachable anymore hence why they don't need to be part of .config, GitLab CI was run on this series (well, not exactly, but it's only changes to the git logs that were made): https://source.denx.de/u-boot/contributors/qschulz/u-boot/-/pipelines/29849 It passes. Link: https://lore.kernel.org/r/[email protected]
2026-04-27rename NET to NET_LEGACYQuentin Schulz
Highlight that NET really is the legacy networking stack by renaming the option to NET_LEGACY. This requires us to add an SPL_NET_LEGACY alias to SPL_NET as otherwise CONFIG_IS_ENABLED(NET_LEGACY) will not work for SPL. The "depends on !NET_LWIP" for SPL_NET clearly highlights that it is using the legacy networking app so this seems fine to do. This also has the benefit of removing potential confusion on NET being a specific networking stack instead of "any" network stack. Signed-off-by: Quentin Schulz <[email protected]> Acked-by: Ilias Apalodimas <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2026-04-22test: Add documentation for the FIT testSimon Glass
Add a Sphinx automodule page for test_fit.py so it appears in the pytest documentation alongside the other test modules. The index already uses a glob pattern, so this is picked up automatically. Signed-off-by: Simon Glass <[email protected]>
2026-01-12Merge patch series "a few test.py improvements"Tom Rini
David Lechner <[email protected]> says: While trying to run the test suite for the first time, I encountered a few minor issues. Here are a few patches to address them. Link: https://lore.kernel.org/r/20260105-a-few-test-py-improvements-v3-0-fea38243ca5b@baylibre.com
2026-01-12doc: pytest: mention additional requirements for venvDavid Lechner
Add a paragraph explaining that in addition to the requirements.txt for test/py/test.py itself, users may need to install additional python packages depending on the U-Boot configuration being built. Reviewed-by: Simon Glass <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]> # sandbox Reviewed-by: Mattijs Korpershoek <[email protected]> Signed-off-by: David Lechner <[email protected]>
2025-12-18doc: pytest: fix typo in multiple config options example for buildconfigspecQuentin Schulz
The option should be 'net_lwip' and not 'net lwip' (see all usage of it in the test code base). Fixes: 2bac578c5aba ("test: allow multiple config options in buildconfigspec") Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Jerome Forissier <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2025-12-06doc: pytest: add missing hook script env varsDavid Lechner
Add the _EXTRA variants of U_BOOT_BUILD_DIR and U_BOOT_RESULT_DIR to the list of environment variables set for hook scripts. These were added in commit 8f2a9fa7d6e7 ("test: Support testing with two board-builds") but were not documented. Signed-off-by: David Lechner <[email protected]>
2025-12-06doc: pytest: fix hook script environment variable namesDavid Lechner
Fix the names of environment variables set for hook scripts. These have a U_BOOT_ prefix, not UBOOT_. Signed-off-by: David Lechner <[email protected]>
2025-11-21doc: pytest: fix u-boot-test-flash typoDavid Lechner
Fix typo: `s/u-boot-test-flash1/u-boot-test-flash/`. The correct name of the script doesn't have a "1" in it. Signed-off-by: David Lechner <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2025-11-15doc: pytest: Complete dependencies list with missing packagesKory Maincent (TI.com)
Add missing dependencies to the pytest usage documentation and correct the device tree compiler package name from 'dtc' to 'device-tree-compiler'. This ensures users have the complete list of dependencies needed to run the pytest test suite without errors. Reviewed-by: Mattijs Korpershoek <[email protected]> Signed-off-by: Kory Maincent (TI.com) <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2025-11-04pytest: add test script to validate Firmware HandoffRaymond Mao
Add test cases to validate FDT and TPM eventlog handoff from TF-A and OP-TEE via bloblist. For FDT, the nodes 'reserved-memory' and 'firmware' appended by OP-TEE indicates a successful handoff. For TPM eventlog, the events 'SECURE_RT_EL3', 'SECURE_RT_EL1_OPTEE' and 'SECURE_RT_EL1_OPTEE_EXTRA1' created by TF-A indicates a successful handoff. Signed-off-by: Raymond Mao <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2025-10-03doc: pytest: Fix inline code and other formattingMartin Schwan
Mainly fix inline code and some other formatting mistakes. Inline code uses double backticks `` in reStructuredText instead of single backticks as in Markdown. Also fix some smaller formatting issues, such as excess colons before literal blocks. Signed-off-by: Martin Schwan <[email protected]>
2025-05-18test: allow multiple config options in buildconfigspecHeinrich Schuchardt
In some cases we have alternative configuration options that supply the same functionality, e.g CONFIG_NET and CONFIG_NET_LWIP. Allow to specify all of them as arguments for buildconfigspec() and execute the text if any of these is fulfilled, e.g. @pytest.mark.buildconfigspec('net', 'net_lwip') Update the documentation. Signed-off-by: Heinrich Schuchardt <[email protected]> Acked-by: Jerome Forissier <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2025-05-18doc: pytest: Use globing for test filesTom Rini
After the original series was merged, Quentin noted that we could handle adding additional tests more easily by using the glob feature. Do so. Suggested-by: Quentin Schulz <[email protected]> Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
2025-05-11doc: pytest: Document the test_button testTom Rini
Add this test to the documentation. No changes to the test itself were required. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2025-05-11doc: pytest: Document the test_bootmenu testTom Rini
Add this test to the documentation. There was already a function comment that included the argument, so convert it to the right style to be rendered correctly in output. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2025-05-11doc: pytest: Document the test_bind testTom Rini
Add this test to the documentation. None of the functions had comments, so attempt to explain what each does. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2025-05-11doc: pytest: Document the test_efi_loader testTom Rini
Add this test to the documentation. We need to add a code-block annotation to the example and indent it correctly. We also need to document the do_test_efi_helloworld_net function and that in turn means changing the documentation to test_efi_helloworld_net_http and test_efi_helloworld_net_tftp to reflect what is and isn't done in those functions themselves now. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2025-05-11doc: pytest: Document the test_bootstage testTom Rini
Add this test to the documentation. We need to move the import to follow the main comment so that it renders correctly, and add a code-block annotation to the example and indent it correctly. Next, neither of the functions had comments themselves, so document them now. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2025-05-11doc: pytest: Document the test_net testTom Rini
Add this test to the documentation. While the diff appears large at first, the only changes within the test are to move the imports to follow the pydoc comment and then to code-block and indent the example configuration. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2025-05-11doc: pytest: Document the test_net_boot testTom Rini
Add the test_net_boot.py test to the generated documentation. While most of this was already commented correctly for inclusion the biggest problem was examples of code without a code-block notation. This in turn broke parsing. Add the missing notations. We also must have the comment prior to any import lines or it will not be seen as a comment on the overall file and thus not included. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2025-05-11doc: pytest: Framework for documenting tests and document test_000_versionTom Rini
In order to easily document pytests, we need to include the autodoc extension. We also need to make sure that for building the docs, CI includes pytest and that we have PYTHONPATH configured such that it will find all of the tests and related files. Finally, we need to have our comments in the test file by in proper pydoc format in order to be included in the output. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2025-05-11doc: Start improving our pytest documentationTom Rini
Begin the work of documenting all of our pytests. To do this, we should have a directory under develop for it as there will be a large number of new files. As the current document is referenced externally in a number of locations, add the sphinx_reredirects module so that we can redirect from the old location to the new. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>