summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
Commit message (Collapse)AuthorAgeFilesLines
* bitbake/conf: Default to zstd compressed image outputRichard Purdie78 min.2-0/+7
| | | | | | | | | | | | Switch our default qemu images to use .zst compressed images by default since this is the output format we release during the release process and is the one that users would prefer to download. This makes the release process use the actual generated output from the system and avoids post processing. (From OE-Core rev: e45b9d93a50dbbdabe52a754ae1bd2093f5f7f78) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/runqemu: Use snapshot mode for image testingRichard Purdie78 min.1-3/+3
| | | | | | | | | We don't need to preserve changes to these images so use snapshot mode so we don't save writes to them. (From OE-Core rev: 0138725fce07f94ad6855b22b8639f4309758b4c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemu: Add compressed image types that are now supportedRichard Purdie78 min.2-2/+2
| | | | | | | | | Add compressed image types that are now supported to the supported fstypes list. (From OE-Core rev: d27ace462691a2d2db9121b31cba84a04f2f77ce) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: runqemu: add tests for booting zst compressed imageYoann Congal78 min.1-1/+20
| | | | | | | | | | Add a simple tests booting a compressed image given to runqemu as path and as image recipe name. (From OE-Core rev: f65675c9640c52dcee46a0d9e98c40032ff28688) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: fix OETestCalledProcessError for check_output methodPeter Marko78 min.1-1/+3
| | | | | | | | | | | | | | | | | | Per documentation, subprocess.CalledProcessError exception has stderr filled out only for run method, it's None for check_output method. So serialize it only if it's not None. Avoids: File "<poky-dir>/meta/lib/oeqa/utils/subprocesstweak.py", line 15, in __str__ s = s + "\nStandard Error: " + strify(self.stderr) ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ TypeError: can only concatenate str (not "NoneType") to str (From OE-Core rev: d52a03f423e8d873f580b11c5e7b56d4f3f358e6) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: do not fail when sdk package is not availablePeter Marko78 min.1-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Prior to commits: * 11277efd057685558a744e98082b5709e849dd2a * d0e8b83d05957b1f22d08582e364afa4b522801e the tests were skipped if package was not available. Now the code calls function ensure_host_package which says "try to sdk-install missing dependencies", however in fact for sdkext it causes a failure if the installation is not available. Since maturin is not installed in any image, it cannot be installed unless it's downloaded from sstate-cache mirror populated by a world build. These builds are however now not done for powerpc and mips. IT also does not work in local builds without sstate-cache mirror. Fix this by skipping the test if the package cannot be installed to match the original behavior before those commits. (From OE-Core rev: d05e4bc170c15393a7ece2b3c5a87e5efbb2a38f) Signed-off-by: Peter Marko <peter.marko@siemens.com> Cc: Ross Burton <ross.burton@arm.com> Cc: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Add test to verify cargo build builds for targetHarish Sadineni78 min.1-0/+16
| | | | | | | | | | | | Ensure that cargo build successfully builds the binary for the target by default. This test validates whether the default build process produces the expected output for the specified target. (From OE-Core rev: a3bb02a3115d06035d52689aa262d0f614a93e42) Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/ltp: Drop ipc that is moved into syscalls in new versionLiu Yiding4 days1-1/+1
| | | | | | | | | | | ipc has been moved into syscalls upstream commit: https://github.com/linux-test-project/ltp/commit/80fd2d673bc0fd8514190a061219c24933b6f03f (From OE-Core rev: 9abe5ae443b9f3855475572a3e11c191d15039e4) Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Upgrade 1.87.0 -> 1.88.0Jayasurya Maganuru4 days1-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rust stable version updated to 1.88.0. https://blog.rust-lang.org/2025/06/26/Rust-1.88.0/ * Rebase existing patches with v1.88.0 * Exclude tidy and coverage-dump from OE self-tests due to test failures Although the build completes successfully, OE self-tests fail: tools/coverage-dump panics during test execution. tools/tidy fails due to a mismatched GCC submodule commit. These tests are excluded to allow successful OE self-test runs. * Two tests from the`codegen` modules now fail only on riscv64. Enable them on arm32/64 and x86-32/64 targets, while restricting them on riscv64 via `only-<target_arch>` tags. Bugzilla link - https://bugzilla.yoctoproject.org/show_bug.cgi?id=15944 Test Results Summary: +-----------+--------+---------+ | Machine | Passed | Ignored | +-----------+--------+---------+ | arm-32 | 28,664 | 1,451 | | arm-64 | 28,748 | 1,396 | | x86-32 | 28,657 | 1,432 | | x86-64 | 28,904 | 1,213 | | riscv-64 | 28,722 | 1,421 | +-----------+--------+---------+ (From OE-Core rev: 5afc9bdbabfdbcb784ceb637926111e6c7648f41) Signed-off-by: Jayasurya Maganuru <Maganuru.Jayasurya@windriver.com> Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: upgrade 3.31.6 -> 4.0.3Moritz Haase2025-07-172-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 Freihofer2025-07-141-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 Freihofer2025-07-142-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 Freihofer2025-07-141-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 Freihofer2025-07-141-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>