summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
Commit message (Collapse)AuthorAgeFilesLines
* rust: Upgrade 1.87.0 -> 1.88.0Jayasurya Maganuru5 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-171-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* oe-selftest: devtool: split tap detection into functionAdrian Freihofer2025-07-141-12/+2
| | | | | | | | | | 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/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>
* 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>
* 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>
* 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/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>
* 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>
* 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>
* 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>
* bitbake.conf/pseudo: Switch from exclusion list to inclusion listRichard Purdie2025-05-121-2/+0
| | | | | | | | | | | | | | | | | Currently, pseudo tracks all files referenced within its presence unless they're listed in an exclusion list. The exclusion list has grown to be fairly unwieldy. This patch swaps PSEUDO_IGNORE_PATHS for PSEUDO_INCLUDE_PATHS which in theory should be easier and more explicit to maintain. This change does drop many directories from pseudo coverage including /home and /tmp. There may be adapatations needed for recipes/classes using pseudo in specific ways. (From OE-Core rev: 2502da81709f25de499277b28d33c915638c45f6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/sdk: add test to verify the manifests are generated correctlyRoss Burton2025-05-121-0/+39
| | | | | | | | | | Add a test that builds a SDK with specific packages in the host and target sections, and verifies that they're listed in the manifest. (From OE-Core rev: a1556c801feb56b79243ba2947b74b84f674072b) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/pokybleeding: change from mtd-utils-selftest to pseudoMikko Rapeli2025-05-121-3/+3
| | | | | | | | | | | | | | | | | Test recipe git repo URL is checked for newer commits and mtd-utils-selftest check is sometimes failing due to server errors. Use pseudo which uses Yocto Project in git servers which should be reliable. Fixes: [YOCTO #15855] build/build-st-17692/tmp/hosttools"; export HOME="/srv/pokybuild"; git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all -c clone.defaultRemoteName=origin ls-remote git://git.infradead.org/mtd-utils.git failed with exit code 128, output: fatal: read error: Connection reset by peer (From meta-yocto rev: a82be5486058c2e5a1e286dba17c33444889c982) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: Add ext4 to IMAGE_FSTYPES in ↵Mikko Rapeli2025-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test_exclude_path_with_extra_space All qemu machines have ext4 in IMAGE_FSTYPES which makes native mkfs.ext4 available at wic image build time. genericarm64 defaults to only wic in IMAGE_FSTYPES and this test was failing: | DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing python function set_image_size | DEBUG: 148548.400000 = 114268 * 1.300000 | DEBUG: 652644.400000 = max(148548.400000, 8192)[148548.400000] + 504096 | DEBUG: 652645.000000 = int(652644.400000) | DEBUG: 652645 = aligned(652645) | DEBUG: returning 652645 | DEBUG: Python function set_image_size finished | DEBUG: Executing shell function do_image_wic | INFO: Creating image(s)... | | ERROR: A native program mkfs.ext4 required to build the image was not found (see details above). | | Please make sure wic-tools have e2fsprogs-native in its DEPENDS, build it with 'bitbake wic-tools' and try again. | | WARNING: exit code 1 from a shell command. NOTE: recipe core-image-minimal-1.0-r0: task do_image_wic: Failed (From OE-Core rev: 59b5ec3d53058237dc6f3e85385851d1a8a97f97) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: Increase rootfs size in test_offsetMikko Rapeli2025-05-011-21/+21
| | | | | | | | | | | | | | | | | | This test is failing on genericarm64 which includes all kernel modules on rootfs by default. Recently added kernel modules triggered the size limits to be exceeded. Fixes: ERROR: Actual rootfs size (112884 kB) is larger than allowed size 102400 kB Doubling the size to avoid issues like this on machines which may include a lot of packages on default images. Size of the rootfs does not matter for the test, only that the offsets are correct in various usecases. (From OE-Core rev: 1ff542318ea66514ef550d4817ba9b2ef688134c) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest.wic: add native sysroot handlingTrevor Woerner2025-05-011-35/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | The wic test_exclude_path_with_extra_space does not succeed on debian-based AB workers since they, by default, do not install the 'parted' utility. This test installs the 'wic-tools' package, which includes the 'parted' utility, but it is not being found/used for some unknown reason. In the previous patch it was believed that doing some extra PATH handling (as performed by some other tests with a python try...finally block) would solve the issue. That turned out to not be the case. This patch starts by reverting that change, since it has no benefit. In order to use the native tools from the 'wic-tools' package, wic's '--native-sysroot' can be used (as demonstrated in other tests). In fact the wic help message explaining the purpose of this flag states that it is for passing "...the path to the native sysroot containing the tools(parted and mtools) to use"[sic]. Removing the host's 'parted' utility better simulates the situation found on the debian workers for testing. This patch is seen to make this test pass with no host 'parted' utility in place. (From OE-Core rev: 306e4831f07d4a8db6ab880487813a6abd0ffa08) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest-ed: Upgrade to version 1.21/1.20.2Richard Purdie2025-05-012-10/+11
| | | | | | | | | | | | | | | | | | | | | Older versions do not compile with GCC 15. We had different versions to test GPLv3 exclusion. 1.21 compiles with gcc 15 and 1.20.2 has a CFLAGS tweak to allow it to work with gcc 15 too. 1.21 is licensed under GPL-2.0 so we need to rework some of the tests. Tweak the gplv3 test by adding a special override of LICENSE to then test the license exclusion code. Modify the archiver selftests to use the new version. Based on a patch from Khem Raj <raj.khem@gmail.com> (From OE-Core rev: 3b17355ad1ecad17d12c5eb0e6403a59ef11f7d7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest.wic: add PATH handlingTrevor Woerner2025-04-291-28/+35
| | | | | | | | | | | | | The wic test_exclude_path_with_extra_space test succeeds on non-debian AB workers. Add PATH handling so parted from the wic-tools can be found on debian-based AB workers. Fixes [YOCTO #15838] (From OE-Core rev: 3994e727f10c5a0143d52bdd6e1d9ca037296d59) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/fetch: Fix whitespaceRichard Purdie2025-04-201-8/+8
| | | | | | | | Update the test whitespace to avoid bitbake warnings. (From OE-Core rev: 8a324aa2111872138715bde7fbc86bcfc2d8b20e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: do not ignore ROOTFS_SIZE if the rootfs is modifiedTrevor Woerner2025-04-171-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the *.wks file contains a "--source rootfs" then lib/wic/plugins/source/rootfs.py will be invoked to generate (what is assumed to be) the rootfs partition. If the rootfs partition needs to be tweaked or modified, the "rootfs.py" plugin will make a copy of the filesystem and then perform the changes on that copy. In other words, if the "--source rootfs" line of the *.wks file also contains any of: --exclude-path --include-path --change-directory --use-label (i.e. modify etc/fstab) then the rootfs will be copied first, then the copy is modified. If, for example, the unmodified IMAGE_ROOTFS is: .../tmp/work/qemuarm64_secureboot-oe-linux/core-image-base/1.0/rootfs then the copy would be made at: .../tmp/work/qemuarm64_secureboot-oe-linux/core-image-base/1.0/tmp-wic/rootfs${LINENO} where ${LINENO} is the line number where this "--source rootfs" line appears in the *wks file. When it comes time to make an actual partition of a specific filesystem type, lib/wic/partition.py::prepare_rootfs() is called. It is in this function that wic figures out if any extra size needs to be added. The bitbake variable used to specify the ultimate rootfs size is ROOTFS_SIZE, and since this variable is only valid for the rootfs (and not any other partitions), the code also verifies that the partition being created is ${IMAGE_ROOTFS}: rsize_bb = get_bitbake_var('ROOTFS_SIZE') rdir = get_bitbake_var('IMAGE_ROOTFS') if rsize_bb and rdir == rootfs_dir: <use rsize_bb> else: <calculate the partition size using "du -ks $p"> As noted above, if lib/wic/plugins/source/rootfs.py has made a copy, then the "rdir == rootfs_dir" clause will fail and the code will assume this partition is not a rootfs since the strings do not compare equal. Therefore, in order to determine if this is a rootfs, retain the existing "rdir == rootfs_dir" comparison, but also add another one to check whether or not this is a wic-generated copy of the rootfs. STEPS TO REPRODUCE: - start with the following *wks file: bootloader --ptable gpt part /boot --size=100M --active --fstype=ext4 --label boot part / --source rootfs --fstype=ext4 --label root - and the following extra variable in conf/local.conf: IMAGE_ROOTFS_EXTRA_SPACE = "500000" - build an image - run it in qemu $ runqemu slirp nographic serial - verify the root partition has extra space: root@qemuarm64-secureboot:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 721.5M 67.4M 600.6M 10% / devtmpfs 477.7M 0 477.7M 0% /dev tmpfs 40.0K 0 40.0K 0% /mnt tmpfs 489.3M 92.0K 489.2M 0% /run tmpfs 489.3M 68.0K 489.2M 0% /var/volatile /dev/vda1 120.4M 19.9M 91.4M 18% /boot - modify the "/" line of the *wks file to be: part / --source rootfs --fstype=ext4 --label root --exclude-path boot/ - build image when it fails: root@qemuarm64-secureboot:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 73.4M 41.9M 25.8M 62% / devtmpfs 477.7M 0 477.7M 0% /dev tmpfs 40.0K 0 40.0K 0% /mnt tmpfs 489.3M 92.0K 489.2M 0% /run tmpfs 489.3M 68.0K 489.2M 0% /var/volatile /dev/vda1 120.4M 19.9M 91.4M 18% /boot after this fix: root@qemuarm64-secureboot:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 721.5M 47.4M 620.6M 7% / devtmpfs 477.7M 0 477.7M 0% /dev tmpfs 40.0K 0 40.0K 0% /mnt tmpfs 489.3M 92.0K 489.2M 0% /run tmpfs 489.3M 68.0K 489.2M 0% /var/volatile /dev/vda1 120.4M 19.9M 91.4M 18% /boot Doing the math we see that the /boot partition is ~20MB and in the first image the / partition contains this ~20MB in addition to the rest of the rootfs. This ~20MB is completely wasted since it is used in the / partition, but then the /boot partition is mounted on top of it, making the /boot directory of / inaccessible. After the fix the / partition has an additional ~20MB since the /boot portion is excluded. Fixes [YOCTO #15555] (From OE-Core rev: 1c690aa046ebca13d7b29de50d42b5d8a4a8486c) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest pokybleeding.py: add test for poky-bleeding.bbclassMikko Rapeli2025-04-101-0/+32
| | | | | | | | | | | The class sets SRCREV to AUTOINC for recipes with single or multiple repositories. Test those cases. (From meta-yocto rev: b7185b27b8acb43eaf9c27787903173ea34a0738) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mdadm: fetch from gitAlexander Kanavin2025-04-101-4/+7
| | | | | | | | | | | | | | | Upstream has released a new version (4.4) but not the tarball for it. Adjust one of the devtool selftests, as it requires that the recipe under test is using a tarball. Another selftest also needs to be tweaked to correctly clean up its modifications to that same recipe on test completion. (From OE-Core rev: de635a9bc0392689ff36b50e7f91572d3fbaac09) 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>