summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
Commit message (Collapse)AuthorAgeFilesLines
* cmake: upgrade 3.31.6 -> 4.0.3Moritz Haase6 days2-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first major release bump for CMake since 3.0 was released in 2014. Compatibility with versions of CMake older than 3.5 has been removed. Full release notes are available at [0]. Obsolete patches have been removed and the few remaining ones have been refreshed. We can now build cmake without patches, only cmake-native requires two that are not suitable for upstreaming. The main license file has been renamed from Copyright.txt to LICENSE.rst in [1]. References to the file have been updated, causing changes to the licensing header in 'cmake.h' (see [2]). Additionally, the '1996 - 2024' copyright statement in (cm)curl's COPYING was updated to '1996 - 2025' in [3]. [0]: https://cmake.org/cmake/help/v4.0/release/4.0.html [1]: https://gitlab.kitware.com/cmake/cmake/-/commit/2d42a5444f859891b6598c76ea5d51510013565e [2]: https://gitlab.kitware.com/cmake/cmake/-/commit/de273b2e115974a012a6204ffee046dc9ce77586 [3]: https://gitlab.kitware.com/cmake/cmake/-/commit/48b13baebc7f99442c3b872f202efd2fb92d6d7f License-Update: License file renamed; copyright years updated (From OE-Core rev: fc7aafb30bc5fe83f8d2ed451cb6b4d68b131fb5) Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de> CC: alex.kanavin@gmail.com Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/command: simplify tap detectionAdrian Freihofer8 days1-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the code by removing the fallback to ifconfig if the ip command is not available. ip commands are nowadays available on all host machines. The transition from ifconfig to ip has taken place long time ago e.g. for the runqemu-gen-tapdevs script. This also fixes the detection of tap devices if the tap devices are not named tap0, tap1, etc. but have a different name, e.g. foo0, foo1 which is the case if the OE_TAP_NAME environment variable is set. Some examples: $ ip tuntap show mode tap $ sudo ./scripts/runqemu-gen-tapdevs 1000 2 Creating 2 tap devices for GID: 1000... Creating tap0 Creating tap1 ... $ ip tuntap show mode tap tap0: tap persist group 1000 tap1: tap persist group 1000 $ sudo ./scripts/runqemu-gen-tapdevs 1000 0 Note: Destroying pre-existing tap interface tap0... Note: Destroying pre-existing tap interface tap1... $ ip tuntap show mode tap $ sudo OE_TAP_NAME=foo ./scripts/runqemu-gen-tapdevs 1000 2 Creating 2 tap devices for GID: 1000... Creating foo0 Creating foo1 ... $ ip tuntap show mode tap foo0: tap persist group 1000 foo1: tap persist group 1000 $ sudo OE_TAP_NAME=foo ./scripts/runqemu-gen-tapdevs 1000 0 Note: Destroying pre-existing tap interface foo0... Note: Destroying pre-existing tap interface foo1... $ ip tuntap show mode tap (From OE-Core rev: 6459ea7c019bcb7a486d286dd964eeeeab99c37d) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: devtool: split tap detection into functionAdrian Freihofer8 days2-12/+18
| | | | | | | | | | Make the check for tap devices available as a function which can be used by other tests as well. (From OE-Core rev: ad8f3a8d959a245301118cf7b850f1a0ab567f01) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: devtool: run without pokyAdrian Freihofer8 days1-1/+2
| | | | | | | | | | | | If DISTRO is set to poky, the ptest DISTRO_FEATURE is enable. However, without meta-poky layer, ptest packages are not compiled and the tests fail with: ERROR: Nothing RPROVIDES 'cmake-example-ptest'... (From OE-Core rev: 7b5b0908a6acf43384a13f2e6801e014a61b8e8f) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: devtool deploy-target test --strip optionAdrian Freihofer8 days1-30/+33
| | | | | | | | | | | Extend the devtool deploy-target test to test with and without the --strip option. The --strip code path recently broke unnoticed because of changes in pseudo. (From OE-Core rev: 4c586320e15d8d8b5b85e2da0b900dcc6a0fff3d) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa context.py: use TEST_SUITES if setMikko Rapeli2025-07-071-0/+7
| | | | | | | | | | | | | If build target has set TEST_SUITES, then that should be the default test modules to execute. Fixes testexport.bbclass to run same tests as testimage.bbclass which already uses TEST_SUITES. (From OE-Core rev: c66b1dc0a2f973a84dc38b7cc27ae823e0f0a916) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: set self.runner and handle NoneMikko Rapeli2025-07-032-0/+3
| | | | | | | | | | | | Set default self.runner to None. qemu target sets the runner to qemu. Then handle self.runner None in run_network_serialdebug(). This way ssh runner and failing ping or ssh tests handle the error cases. (From OE-Core rev: 39f72147ef402bea54a66abf984315c1f93aa141) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: Simplify test specification and discoveryThune Tran2025-07-018-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify how tests are specified and discovered for different SDK configurations to allow per-layer customization. * Introduce `TESTSDK_CASE_DIRS` variable to specify test directory types, replacing the need to modify the default_cases class member * Discover tests from configured layers using a common discovery pattern (`<LAYER_DIR>/lib/oeqa/<dirname>/cases`) where `<dirname>` is specified in `TESTSDK_CASE_DIRS` * The buildtools directories were renamed to follow the common discovery pattern (`<LAYER_DIR>/lib/oeqa/<dirname>/cases`) for consistency across all SDK configurations. meta/lib/oeqa/ ├── sdk/cases/ # Standard SDK: dirname="sdk" ├── buildtools/cases/ # Buildtools: dirname="buildtools" └── buildtools-docs/cases/ # Buildtools-docs: dirname="buildtools-docs" meta-mingw/lib/oeqa/ └── sdkmingw/cases/ # MinGW: dirname="sdkmingw" meta-foo/lib/oeqa/ └── sdk/cases/ # Standard SDK: dirname="sdk" Tested by: 1. Adding new tests using the default discovery pattern `<LAYER_DIR>/lib/oeqa/sdk/cases` and verifying they are discovered and executed. 2. Verifying existing SDK configuration tests work (requires -c populate_sdk first): * Standard SDK: `bitbake core-image-minimal -c testsdk` * Buildtools tarball: `bitbake buildtools-tarball -c testsdk` * Buildtools docs tarball: `bitbake buildtools-docs-tarball -c testsdk` * Mingw SDK: (SDKMACHINE = "x86_64-mingw32") `bitbake core-image-minimal -c testsdk` (From OE-Core rev: bde94c128c0b4e7e1ebea40f582b4dd6dcc965ff) Signed-off-by: Thune Tran <thune.a.tran@boeing.com> Signed-off-by: Chuck Wolber <chuck.wolber@boeing.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/devtool: update create_go test to match the new behaviourRoss Burton2025-07-011-23/+10
| | | | | | | | | Update the test now that the recipe uses go-mod-update-modules. (From OE-Core rev: 1030223a43aa4500c0d4ebd9dfacf60b44239481) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sefltest/devtool: improve assignment matching in _test_recipe_contentsRoss Burton2025-07-011-1/+1
| | | | | | | | | | | | | This function assumed that all assignments are done with just "=". However, being able to check += or ?= is also useful, so use a regex to split the line and be more flexible about what an assignment operator looks like. (From OE-Core rev: bee528f38d39ed1f91319201e8a99c0b65c9f975) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: move pokybleeding selftest from meta to meta-pokyAlexander Kanavin2025-06-261-32/+0
| | | | | | | | | | meta/ is 'owned' by oe-core and meta-yocto repo should not be putting files in it. (From meta-yocto rev: 83be7b1c70a7f90f611ad33284d0b8f963552eae) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqq/runtime/ethernet_ip_connman: remove test_set_virtual_ip referenceMikko Rapeli2025-06-261-1/+0
| | | | | | | | | | | | | | It was removed. Fixes test loading after testexport.bbclass has exported the tests: oeqa.core.exception.OEQADependency: TestCase ethernet_ip_connman.Ethernet_Test.test_get_ip_from_dhcp depends on ethe rnet_ip_connman.Ethernet_Test.test_set_virtual_ip and isn't available, cases available odict_keys(['apt.AptRepoTest. test_apt_install_from_repo', 'boot.BootTest.test_reboot', 'buildcpio.BuildCpioTest.test_cpio', ... (From OE-Core rev: 6112eb97e20c1fb38acb9e78e89876c4302f65b8) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sstatetests: Improve/fix sstate creation testsRichard Purdie2025-06-261-48/+30
| | | | | | | | | | | | | | | | | | | | | | There are multiple problems with the sstate creation tests. They currently both execute twice, once to check one set of files, then another. We can do this together in one test which makes the code easier to follow. The common test function also has parameters which were always the same value, so those can be simplified. We can use the umask context manager from bb.utils to simplfy the umask code. The badperms test was actually broken, it was detecting bad permissions, then ignoring them. This patch fixes that regression too and allows the check to operate (relying on a separate fix to sstate umask handling). The result should be an easier to understand couple of test cases which should also function correctly and be more reliable. (From OE-Core rev: 5b9263040013199c5cb480125d5ca349f5d6dc55) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sstatetests: Fix NATIVELSBSTRING handlingRichard Purdie2025-06-261-7/+12
| | | | | | | | | | | | | | The NATIVELSBSTRING variable changes value once a BuildStarted event occurs in a build directory. This meant running some of the tests directly in a fresh build directory would fail but they'd pass when run as a group of tests. This is clearly suboptimal. Move the NATIVELSBSTRING handling to a location where the value is consistent and a comment about the interesting behaviour of the variable so it hopefully doesn't catch out others in future. (From OE-Core rev: e1c46fdb44fed18909d9ff4b43b4e445c5a22d33) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/stap: fix script logic problemVictor Kamensky2025-06-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | Looks as a typo introduced by "6cf4d23a2d26c2767edd93f2eb317ff759b5a992 (oeqa/runtime/stap: improve systemtap test)" - when original command was split into two parts 'self.target.run' was missed for the second part. Note this and previos commit issues were masked because mentioned commit has try/except around tests, so failures that normally are reported when test assertEqual throw an exception never reached oeqa infra. Effectively, this test was broken for the last 3 years. I will leave blanket try/except around test for now, so this test will pass all the time as long as dmesg is working. But at least with the fixes one can inspect log.do_testimage output and check that all steps are successful or not. (From OE-Core rev: ec6e4fa83b8d64035b61c080402151af04b3d137) Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/stap: fix module name: stap-hello -> stap_helloVictor Kamensky2025-06-261-2/+2
| | | | | | | | | | | | | | | Systemtap refuses modules names like stap-hello, it says: > ERROR: Safety pattern mismatch for -m parameter ('stap-hello' vs. '^[a-z0-9_]+$') rc=1 'stap-hello' was introduced by: 6cf4d23a2d26c2767edd93f2eb317ff759b5a992 (oeqa/runtime/stap: improve systemtap test) and '-m parameter' regexp check was in SystemTap from 2010, not sure how this test case ever passed after mentioned change. (From OE-Core rev: bb916c60a32be57babaf67d0bcad4724547feb31) Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic-image-minimal, oeqa/selftest/wic: run 'wic ls/cp/rm' in bitbake taskHongxu Jia2025-06-261-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to commit [2255f28b57 wic: add WIC_SECTOR_SIZE variable][1] applied, call `wic ls|cp|rm|write' in bitbake task will hung, but we have no scenario case to cover it After commit [scripts/wic: fix calling wic ls|cp|rm|write hung in bitbake task] applied, this commit run `wic cp|ls|rm' in case wic.Wic2.test_wic_image_type and wic.Wic2.test_qemu, at post function of with do_image_wic in image wic-image-minimal, and check if file is there $ echo 'SANITY_TESTED_DISTROS = ""' >> conf/local.conf $ oe-selftest -r wic.Wic2.test_wic_image_type wic.Wic2.test_qemu ... 2025-06-23 15:46:22,157 - oe-selftest - INFO - Adding: "include selftest.inc" in /buildarea5/hjia/poky/build-st/conf/local.conf 2025-06-23 15:46:22,157 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf 2025-06-23 15:46:22,157 - oe-selftest - INFO - test_qemu (wic.Wic2) The variable 'TEST_RUNQEMUPARAMS' is not defined 2025-06-23 15:56:46,319 - oe-selftest - INFO - ... ok 2025-06-23 15:56:46,324 - oe-selftest - INFO - test_wic_image_type (wic.Wic2) 2025-06-23 15:57:17,780 - oe-selftest - INFO - ... ok 2025-06-23 15:57:17,781 - oe-selftest - INFO - ---------------------------------------------------------------------- 2025-06-23 15:57:17,781 - oe-selftest - INFO - Ran 2 tests in 655.792s 2025-06-23 15:57:17,781 - oe-selftest - INFO - OK 2025-06-23 15:57:25,743 - oe-selftest - INFO - RESULTS: 2025-06-23 15:57:25,743 - oe-selftest - INFO - RESULTS - wic.Wic2.test_qemu: PASSED (624.16s) 2025-06-23 15:57:25,744 - oe-selftest - INFO - RESULTS - wic.Wic2.test_wic_image_type: PASSED (31.46s) 2025-06-23 15:57:25,746 - oe-selftest - INFO - SUMMARY: 2025-06-23 15:57:25,746 - oe-selftest - INFO - oe-selftest () - Ran 2 tests in 655.793s 2025-06-23 15:57:25,746 - oe-selftest - INFO - oe-selftest - OK - All required tests passed (successes=2, skipped=0, failures=0, errors=0) (From OE-Core rev: 18d774eafb7fba720882fcdb945d145b82fa1dd4) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libglvnd: migrate from meta-oeDmitry Baryshkov2025-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | libglvnd is a vendor-neutral approach to handling OpenGL / OpenGL ES / EGL / GLX libraries. It has been proposed and initially implemented by NVIDIA in order to simplify coinstallation of GL drivers provided by different vendors. Major Linux distributions (Debian, Ubuntu, Fedora, etc.) have already switched to libglvnd. Having libglvnd in OE-Core simplifies integration of this ABI into distro and BSP layers (e.g. it will help meta-tegra, which currently provides its own version of the recipe). Import recipe for libglvnd from the meta-oe layer (changes: fix virtual package names, add add the SUMMARY data, drop git@ from SRC_URI, require glvnd DISTRO_FEATURE). (From OE-Core rev: 621e9be9663e448dde3f6b6a02b413fd65983e6c) Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/case: add file exists assertionRoss Burton2025-06-231-0/+8
| | | | | | | | | | Add assertFileExists() to simply tests that want to check that a file exists. (From OE-Core rev: b62e53a0cff2522fef3b89de875c9526a626d7dd) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/buildhistory: Move test cases to common locationRichard Purdie2025-06-233-66/+57
| | | | | | | | | | Having the test cases split in different places makes no sense. Move them all to the place you'd expect to find them. Drop the base class as it is no longer needed. (From OE-Core rev: c5a8a1dc637206fa398c639c49531f709e5b002f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool/devtool: calculate source paths relative to UNPACKDIRAlexander Kanavin2025-06-202-15/+15
| | | | | | | | | | | | | | | | | | | | Now that recipes default to S in UNPACKDIR, recipetool and devtool should do the same. There was some discussion about changing devtool to simply setting UNPACKDIR via bbappend to a workspace and running unpack task directly; currently it has a bunch of convoluted path calculations, substitutions, moving source trees around and and special casing (devtool-source.bbclass in particular is an unpleasant hack). This should definitely be done; but right now we can simply tweak existing code which at least doesn't make it worse. (From OE-Core rev: c326ca8aeb2bf0f7719e43921d10efd5dedc7b2a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: set S from UNPACKDIR in recipes that use only local filesAlexander Kanavin2025-06-201-2/+2
| | | | | | | | | | | | | | | There is no need to have two assignments; also setting S from UNPACKDIR (and not vice versa) is more logical as unpack task comes first, and tasks that come after unpack use S to access unpack results. Also adjust reference test data in selftest/recipeutils to reflect changes in test recipes. (From OE-Core rev: f64b7e5fb3181734c8dde87b27e872a026261a74) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove S in recipes that fetch from git via setting ↵Alexander Kanavin2025-06-202-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BB_GIT_DEFAULT_DESTSUFFIX Removing all the S = ${WORKDIR}/git assignments works because BB_GIT_DEFAULT_DESTSUFFIX is set to match S from bitbake.conf (which itself is set to match typical tarball releases). A few recipes are setting S to a sub-directory of the git tree and need to be adjusted accordingly. bzip2 recipe is fetching a tarball and separately cloning tests; adjust the recipe to put the latter into 'bzip2-tests', instead of 'git'. devupstream.bbclass no longer needs to rewrite S, and is adjusted accordingly. Adjust scripts/lib/recipetool/append.py to not hardcode 'git' as unpack destination. Adjust kernel-yocto.bbclass to use the git unpack variable instead of hardcoding 'git' (there's also removal of repetition of string constants and a correction of workdir/unpackdir mismatch in one of the if-else branches). Ensure build-appliance-image recipe does not use 'git' as checkout directory for poky repo, but rather explicitly name it 'poky'. Ensure reproducible.py code that looks for git repositories does not hardcode 'git' but uses the destination set by BB_GIT_DEFAULT_DESTSUFFIX. Ensure recipetool does not write out unneeded S settings into newly created recipes that fetch from git. Adjust selftest to not hardcode 'git' as unpack directory. (From OE-Core rev: f80c07019ddadaf9c5fb890faabfda7920ecd15e) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/command: fast-path get_bb_var()Ross Burton2025-06-201-1/+14
| | | | | | | | | | | | | | | get_bb_var() currently end up calling 'bitbake -e' and parsing the whole output. However if postconfig isn't set then we can speed this up by just calling bitbake-getvar. The complication with failing bitbake-getvar calls is because we need to be careful to return None instead of the empty string when the variable doesn't exist. (From OE-Core rev: fafe77879aa6225aa8b5187ff590bb4998cbf987) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: add new test for toolchain switchingRoss Burton2025-06-191-0/+71
| | | | | | | | | | | | | | Add a basic test for the toolchain switching code: set the toolchain to GCC by default but Clang for a specific recipe, and verify that two recipes are built with the expected compiler. This works because before we strip the installed binaries there is a .comment segment that contains the list of toolchains used. (From OE-Core rev: 7988c32191927f1c6db422c959eab7a03dfeda04) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/esdk: remove postconfig argumentRoss Burton2025-06-191-5/+1
| | | | | | | | | | | | | | | | Discovered when looking for users of get_bb_var()'s postconfig argument, this wrapper around runCmd() has a postconfig argument that has odd behaviour: it _appends_ the new configuration to local.conf instead of having them used for this specific run (unlike the other functions in commands.py) None of the eSDK tests use this functionality, so remove it. Future test cases that need to write further configuration should do so directly. (From OE-Core rev: 6196d096b95b36f8b72b4049d5479f8f23e7891d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: Add test for signing U-Boot FIT image without SPLJamin Lin2025-06-191-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new selftest case `test_sign_uboot_fit_image_without_spl` to verify that the build can correctly generate and sign a U-Boot FIT image in a scenario where no SPL is used. Background: - Some boards build only the U-Boot proper FIT image and do not require an SPL. - The signing flow must handle this case gracefully: generate the ITS, sign the FIT image, and skip signing/injecting a key into the SPL DTB. What this test does: 1) Enables `UBOOT_FITIMAGE_ENABLE` and `SPL_SIGN_ENABLE` but explicitly sets `SPL_DTB_BINARY` to an empty string to indicate that no SPL is present. 2) Verifies that the U-Boot ITS and FIT image are built successfully. 3) Confirms that the generated ITS file includes signature metadata as requested. 4) Dumps the FIT image to ensure that the signature nodes exist. 5) Confirms that the log for `do_uboot_assemble_fitimage` shows the expected mkimage/mkimage_sign invocation. This ensures that signing works correctly even when only the U-Boot proper is built, which matches real-world configurations that do not require an SPL. (From OE-Core rev: cdb4f4249a386113bebc65918a1b088c64e59182) Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Update after plugin name changesRichard Purdie2025-06-161-5/+5
| | | | | | | | Update the plugin names to account for the "-" to "_" plugin name change. (From OE-Core rev: afa1b5c9f6ed17c021e37a54d0d6abee50a60bf9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: replace cleansstate with compile -fAdrian Freihofer2025-06-161-1/+1
| | | | | | | | | | | | | | | | Avoid using "cleansstate" in tests, as it can remove files from SSTATE_DIR and disrupt parallel builds on autobuilders. Use "bitbake kernel-signing-keys-native -c compile -f" to force key regeneration without affecting shared state. This issue was introduced in: oe-selftest: fitimage: cleanup FIT_GENERATE_KEYS OE-Core rev: 97e58d7c2bc1943f0696fc72984788f459f7f7c4 (From OE-Core rev: 917e2989f34fde12d3f039744fca1d5ab5b4a7a8) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: fix new parser compatibilityAdrian Freihofer2025-06-161-3/+3
| | | | | | | | | | Recent parser changes throw a warning if there is no space around the = operator. (From OE-Core rev: 518df809354a745deebe3c85b1390557398c8893) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Upgrade 1.85.1->1.86.0Yash Shinde2025-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rust stable version updated to 1.86.0. https://blog.rust-lang.org/2025/04/03/Rust-1.86.0.html * Add pkgconfig-native and openssl to resolve openssl-sys crate dependency on pkg-config. As per rust document this is a required dependency. Fixes: | error: failed to run custom build command for `openssl-sys v0.9.106` | Could not find openssl via pkg-config: | The pkg-config command could not be found. | | Most likely, you need to install a pkg-config package for your OS. | Try `apt install pkg-config`, or `yum install pkg-config`, | or `pkg install pkg-config`, or `apk add pkgconfig` depending on your distribution https://crates.io/crates/openssl-sys/0.9.108/dependencies https://github.com/rust-lang/rust/blob/master/INSTALL.md#dependencies * Add Ninja as a dependency for building Rust to prevent bootstrap build regression. Fixes: | Building LLD for x86_64-unknown-linux-gnu | | Couldn't find required command: ninja (or ninja-build) | | You should install ninja as described at | <https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages>, | or set `ninja = false` in the `[llvm]` section of `config.toml`. | Alternatively, set `download-ci-llvm = true` in that `[llvm]` section | to download LLVM rather than building it. * Add bash to DEPENDS to resolve missing dependency for subtree-sync.sh Fixes: ERROR: rust-1.86.0-r0 do_package_qa: QA Issue: /usr/lib/rustlib/src/rust/library/portable-simd/subtree-sync.sh contained in package rust requires /bin/bash, but no providers found in RDEPENDS:rust? [file-rdeps] * Add do_install:append() task to remove cargo bin from rust native builds. This resolves the following conflict: Fixes: ERROR: libstd-rs-1.86.0-r0 do_prepare_recipe_sysroot: The file /usr/bin/cargo is installed by both rust-native and cargo-native, aborting * Update Unicode-3.0 license checksums. License-Update: Copyright and license files to distributions are updated. https://github.com/rust-lang/rust/commit/f9c16997dc016a3ef1456f56df2ab564a1c48cb2 It adds copyright and license files (including HTML versions) to distributions, aligns with license compliance tools like reuse, and ensures all required license texts are properly included and formatted. * Disable building of extended Rust tools to reduce build time and filesystem usage. Update config.toml to disable building of extended Rust tools that are not required. This helps minimize unnecessary build time and filesystem usage. * The "remote-test-server" bin is now generated in stage2-tools-bin dir rather than stage1. Update the test suite accordingly. * Fix do_package QA issue by packing missing zsh files and directories: Fixes: do_package: QA Issue: rust: Files/directories were installed but not shipped in any package: /usr/share/zsh /usr/share/zsh/site-functions /usr/share/zsh/site-functions/_cargo Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install * From v1.86.0, a "self-contained" LLD is built as part of rust bootstrap build. This results in additional build time and installations. Disable rust-lld in config.toml to prevent it. References: https://github.com/rust-lang/rust/pull/135001 https://github.com/rust-lang/rust/commit/8744b44e6bde053f7656a3c727c968177ee8e4b6 * Drop Zdual-proc-macros-additional-check.patch patch since it's merged with v1.86.0 https://github.com/rust-lang/rust/commit/139d6ba054a1a4cc5fe64981ad46fd5547bd4916 * LTO config is applied to rustdoc from v1.86.0. Rebase 0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch which disables it to avoid suffixes in binaries causing non-reproducibility. https://github.com/rust-lang/rust/commit/1fe351b * Restrict tests using "//@only <target_arch>" to avoid failures on riscv64, which is now part of default AB testing. Since riscv64 is Tier 2 with no automated testing, some tests may fail. This approach ensures tests continue running on supported architectures while skipping them on riscv64. https://doc.rust-lang.org/rustc/platform-support.html#tier-2-with-host-tools (From OE-Core rev: c064ef18343a956aea397d36d2e7665d6c8afd7d) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: add test case for oeqa.utils.subprocesstweakRoss Burton2025-06-091-2/+35
| | | | | | | | | | | This class has a monkey-patched CalledProcessError instance that extends the __str__ method. Add a test case to ensure that it behaves as expected. (From OE-Core rev: 3c0e7b537eac62fced196e82ede781d88e593a69) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/utils/sshcontrol: correct condition for ending the select() loopAlexander Kanavin2025-06-091-1/+1
| | | | | | | | | | | | This was set backwards; per https://docs.python.org/3/library/subprocess.html#subprocess.Popen.returncode a return code of None indicates the process is still running, and so the code entered a busyloop that ended on timeout 5 minutes later, lengthening selftests significantly. (From OE-Core rev: a6690deffd7ddbce0e784701ea3fdbb84313b009) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/subprocesstweak: clean up __str__()Ross Burton2025-06-051-9/+4
| | | | | | | | | | Call super().__str__ to get the bulk of the string representation, and we don't need to guard on output/strerr existing as they always set. (From OE-Core rev: 2adcac16dd26fd054ea779cc4e7aa32282d9bdde) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa selftest uboot.py: add qemu KVM test caseMikko Rapeli2025-06-051-2/+57
| | | | | | | | | | | | | | | | | | Add a test case to boot target system via u-boot using qemu with KVM. This was broken recently and workaround proposed to u-boot. Test case works with genericarm64 and qemuarm64 target machines compiled and tested on aarch64 build host with KVM support. Test execution time with full sstate cache is around 170 seconds. qemu boot itself takes just a few seconds to full userspace. (From OE-Core rev: dce900b029607d12ad55de35741f245beb409b47) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa decorator/data.py: add skipIfNotBuildArch decoratorMikko Rapeli2025-06-051-0/+12
| | | | | | | | | | | To limit tests to specific build host architectures. For example KVM testing will only work if target and build architectures are the same. (From OE-Core rev: c59b74b8bfd3b351a31204f33e00351ad5e5b657) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: remove kernel-fitimage testsAdrian Freihofer2025-06-051-16/+0
| | | | | | | | | Remove the test cases for the kernel-fitimage.bbclass. (From OE-Core rev: c699dc66fd30cdfc5a3d53997107b870b9e4af65) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage refactor classesAdrian Freihofer2025-06-051-14/+14
| | | | | | | | | | | | | Make the new KernelFitImageRecipeTests class the one that contains the code, and keep the KernelFitImageTests class as the one that just adds back the same tests. This will make it easier to delete the tests later, which will hopefully become obsolete when the kernel-fitimage.bbclass class is no longer needed. (From OE-Core rev: 622c446c7c6139ed12c2fa2d9cffa108a85f4390) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: run all tests for both FIT implementationsAdrian Freihofer2025-06-051-0/+13
| | | | | | | | | | | | | | | | | | | | Run all existing tests for kernel-fitimage.bbclass also with the new linux-yocto-fitimage recipe. Executing each test for both implementations helps ensure functional compatibility and consistency between them. This change will naturally double the test duration for FIT image-related tests, as each test now runs against both implementations. However, the goal is to eventually deprecate kernel-fitimage.bbclass, at which point the duplicate tests can be removed. Additionally, since the new implementation makes significantly more efficient use of the sstate cache compared to the old one, the overall test execution time may still be improved. (From OE-Core rev: d966939e1758cb1a978f486219f642bf67c8ad48) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: support new FIT recipe as wellAdrian Freihofer2025-06-051-21/+37
| | | | | | | | | | | | | | | | | Enable all existing tests to be compatible with FIT images generated either by the new linux-yocto-fitimage recipe or the legacy kernel-fitimage.bbclass approach. - Make the following configurations optional: - KERNEL_IMAGETYPES += "fitImage" - KERNEL_CLASSES = "kernel-fitimage" - Allow the tests to specify which kernel recipe should be used for the build (e.g., linux-yocto, linux-yocto-fitimage, etc.) (From OE-Core rev: 20cbb095f8685848aa5e31d04006b9842b387912) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: add tests for fitimage.pyAdrian Freihofer2025-06-051-4/+175
| | | | | | | | | | | | Having the FIT image generator code as a separate class, which is essentially independent of BitBake, also allows testing the code separately from BitBake. Take advantage of this enables testing more use cases with significantly faster tests. (From OE-Core rev: f990d95007a616bdafbe80c30877d3bdfd954c05) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: refactor order in itsAdrian Freihofer2025-06-051-2/+2
| | | | | | | | | | | | | | When the ITS file is created, the mandatory properties are written first before the optional properties are written. This is not really useful for the current implementation. But it is a preparation for a new Python-based implementation that will expect mandatory properties first. This change makes it possible to run the tests with both the old and the new implementation. (From OE-Core rev: 1044366a32d544af53307a03d7d3b0aaf4519990) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: cleanup FIT_GENERATE_KEYSAdrian Freihofer2025-06-051-16/+8
| | | | | | | | | | | | | | | | It is closer to practice to use static and predictable keys to sign the FIT images. In addition, the new kernel-signing-keys-native is only reliable if the temporary directory is not deleted. However, depending on how this test suite is started, this can happen. There will therefore only be one test that uses the recipe to generate the keys, which ensures that the recipe works in principle. It is also ensured that no keys are present before the test and that the recipe runs safely and is not skipped by Bitbake. (From OE-Core rev: 97e58d7c2bc1943f0696fc72984788f459f7f7c4) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: test FIT_CONF_DEFAULT_DTBAdrian Freihofer2025-06-051-4/+10
| | | | | | | | | Add some test coverage for non default FIT_CONF_DEFAULT_DTB. (From OE-Core rev: d9ae846307b640f6c85a67dee405cbaa6258efd4) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: test FIT_CONF_PREFIXAdrian Freihofer2025-06-051-12/+16
| | | | | | | | | Add a test which does not use the default FIT_CONF_PREFIX configuration. (From OE-Core rev: 12f20ddefe0393eea8d1c3534058596f3407b5f5) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: test external dtbAdrian Freihofer2025-06-051-12/+61
| | | | | | | | | | | | | | | | | | | | | | | | There are several ways to insert external devicetrees and devicetree overlays into the kernel and thus at least to some extent into the FIT image. So far there is no test coverage. Let's improve this as much as possible without fully understanding all use cases. This first test adds a devicetree overlay to a build configuration without signing, since signing is apparently not yet meaningful when PREFERRED_PROVIDER_virtual/dtb = “bborg-relay-00a2” is used. It is also not entirely clear how these external devicetree overlays are used by the configuration nodes of the FIT image. Currently, one configuration is created per dtb dtbo node, which is not really useful for dtbo nodes. Before this test can be extended to test devicetree overlays and signing, the code that creates the configuration nodes in its file probably needs some improvements in terms of more flexibility in defining the references from configuration nodes to image nodes. (From OE-Core rev: 3442d9297dcab400dfe8db93790e049778e0abdb) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/maturin/guessing-game: Bump dependencies to avoid security warningRichard Purdie2025-06-041-1/+1
| | | | | | | | | | | | | The Cargo.toml lock for guessing-game, used to test maturin has a minor security advisory which keeps tripping up github's automated security analysis, "PyO3 Risk of buffer overflow in `PyString::from_object`". Bump the minimum version requirement for pyo3 to avoid this warning even if it isn't anything critical and just automated tests. (From OE-Core rev: 2e817e6e4d53543766b935479b148a1950cc37c8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatetests: Switch to new CDNRichard Purdie2025-05-291-1/+1
| | | | | | | | | The project is switching the way handle our CDN provision of sstate objects, update the URL accordingly. (From OE-Core rev: fea96974f1ee6ae6dceb39e3ca8157797d81586c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/reproducible: Limit memory used by diffoscopeYoann Congal2025-05-271-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | When working on large diffs (eg in meta-oe's repro test) diffoscope may use a huge amount of memory and trigger OOM kills on parallel builds. Use the max_diff_block_lines_saved option to limit to 1024 the number of diff lines saved in a block. Also, limit the number of line in the report to generate a report even when the limit is reached. The chosen default 1024 comes from diffoscope default for a diff block. For a random 10MB binary (packaged in ipk, deb and rpm), this does decrease the "Maximum resident set size" of diffoscope from 1.3GB to 400MB. As an added bonus, this also make diffoscope bail out earlier, on the same example: execution time goes from 30 minutes down to 7. Fixes [YOCTO #15876] (From OE-Core rev: 04cbcfc7e09d19b0ba50e7940fc82d10e222fdbe) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/rust: Add exclusion to fix riscv64 buildsRichard Purdie2025-05-151-0/+1
| | | | | | | | | There was one failure occurring in rust testing for qemuriscv64. Exclude that test so we can enable in automated testing. (From OE-Core rev: a7f6ea5b20aa91e4a1b00dbea7a6447effb9220d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>