summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* rust: Upgrade 1.85.1->1.86.0Yash Shinde2 days1-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>
* package: export debugsources in PKGDESTWORK as jsonDaniel Turull2 days1-0/+46
| | | | | | | | | | | | | | | | | | | | | | | The source information used during packaging can be use from other tasks to have more detailed information on the files used during the compilation and improve SPDX accuracy. Source files used during compilation are store as compressed zstd json in pkgdata/debugsources/$PN-debugsources.json.zstd Format: { binary1: [src1, src2, ...], binary2: [src1, src2, ...] } I checked the sstate size, and it slightly increases using core-image-full-cmdline: without patch: 2456792 KB sstate-cache/ with patch: 2460028 KB sstate-cache/ (4236 KB or 0.17%) CC: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: c507dcb8a8780a42bfe68b1ebaff0909b4236e6b) Signed-off-by: Daniel Turull <daniel.turull@ericsson.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 Burton5 days1-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 Kanavin5 days1-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 Burton9 days1-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 Rapeli9 days1-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 Rapeli9 days1-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 Freihofer9 days1-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 Freihofer9 days1-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 Freihofer9 days1-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 Freihofer9 days1-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 Freihofer9 days1-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-fit-image.bbclass: add a new FIT image implementationAdrian Freihofer9 days1-0/+547
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new recipe linux-yocto-fitimage.bb and the new kernel-fit-image.bbclass are intended to become successors of the kernel-fitimage.bbclass. Instead of injecting the FIT image related build steps into the kernel recipe, the new recipe takes the kernel artifacts from the kernel recipe and creates the FIT image as an independent task. This solves some basic problems: * sstate does not work well when a fitImage contains an initramfs. The kernel is rebuilt from scratch if the build runs from an empty TMPDIR. * A fitImage kernel is not available as a package, but all other kernel image types are. * The task dependencies in the kernel are very complex and difficult to debug if something goes wrong. As a separate, downstream recipe, this is now much easier. The recipe takes the kernel artifacts from the deploy folder. There was also a test implementation passing the kernel artifacts via sysroot directory. This requires changes on the kernel.bbclass to make it copying the artifacts also to the sysroot directory while the same artifacts are already in the sstate-cached deploy directory. The new class kernel-fit-extra-artifacts.bbclass generates and deploys the kernel binary intended for inclusion in a FIT image. Note that the kernel used in a FIT image is a stripped (and optionally compressed) vmlinux ELF binary - not a self-extracting format like zImage, which is already available in the deploy directory if needed separately. The kernel-fit-extra-artifacts.bbclass can be used like this: KERNEL_CLASSES += "kernel-fit-extra-artifacts" (if uImage support is not needed, or with :append otherwise) The long story about this issue is here: [YOCTO #12912] (From OE-Core rev: 05d0c7342d7638dbe8a9f2fd3d1c709ee87d6579) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: refactor order in itsAdrian Freihofer9 days1-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 Freihofer9 days1-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 Freihofer9 days1-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 Freihofer9 days1-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 Freihofer9 days1-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 Purdie11 days1-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>
* rootfs.py: Don't create modules directory for all kernelsMike Crowe2025-05-271-5/+6
| | | | | | | | | | | | | | | | | | | | | efa88e1c227d695319197f511701e0230d301f39 arranged for the versioned modules directory to be created and depmod to run for every kernel package. Unfortunately this happens for every _built_ kernel package, even if that package and/or its modules aren't installed in the rootfs. Let's assume that there's no point in running depmod if the modules directory did not already exist. (This problem was observed in Scarthgap and this fix was tested there. It doesn't look like any of the subsequent changes will have affected this behaviour.) (From OE-Core rev: 80c218462c6e4a2deb73803a5d36e8b1f7ed5ed7) Signed-off-by: Mike Crowe <mac@mcrowe.com> Reviewed-by: Jack Mitchell <jack@embed.me.uk> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> 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/sdk/autotools: verify that configure is using the correct hostRoss Burton2025-05-121-0/+6
| | | | | | | | | | Search config.log for the correct host_alias assignment to verify that configure has correctly identified the host system. (From OE-Core rev: ade66073a1c89918f849eb2932c05342e8f3ab4f) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/maturin: no need for a setupClass, merge code into testRoss Burton2025-05-121-14/+11
| | | | | | | | | | There's no need to copy files inside setUpClass() when there's only one test function that uses it. Just do all of the test inside the test. (From OE-Core rev: 5474677b21f2f4069f355abdc600483c42d0b0b3) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/maturin: be less picky in the list_python testRoss Burton2025-05-121-10/+8
| | | | | | | | | | | | | | | | | | The test assumed that maturin would only find a single Python binary, in /usr/bin/python3*. However in eSDKs with buildtools a Python is shipped with the SDK, so the test failed. Generalise the test so that it runs python3 and obtains its path and version, and then verifies that path and and version are found by Maturin. This means we're not assuming a single Python, or the paths, or that the Python is CPython. (From OE-Core rev: ae9b5dae77ef140422fcf71d239ca028c9208447) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/meson: add check that meson has detected the target correctlyRoss Burton2025-05-121-0/+9
| | | | | | | | | | | Use 'meson introspect' to dump JSON describing the build configuration and validate that the target architectures and cross-compiler is correctly set. (From OE-Core rev: 1c84361829921e91d782b189e2bde818a2d1491c) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/gtk3: build libhandy instead of galculatorRoss Burton2025-05-121-26/+20
| | | | | | | | | | | | | | | | galculator hasn't been touched for a decade now[1] and fails to compile under GCC 15. Switch to building libhandy, which is the GTK+3 precursor to libadwaita in the Gnome stack. Whilst this is in low-maintainence mode, will be updated if it breaks. [1] https://github.com/galculator/galculator/ (From OE-Core rev: ff6fa71eb0511d8594c4416a37d75a85470ff9c6) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/meson: generalise test caseRoss Burton2025-05-121-17/+34
| | | | | | | | | | | | | | Refactor this test case so the generic "build a meson project" code is separated out and can be reused. Also currently meson inside eSDKs only works with fully populated eSDKs, but our testing uses minimal eSDKS, so skip the test if the eSDK is a minimal build. A bug has been filed to resolve this. (From OE-Core rev: 575e0bf52db0467d88af4b5fe467b682f10ca62a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/kmod: skip test in eSDKsRoss Burton2025-05-121-0/+4
| | | | | | | | | | | At the moment we can't run this test inside an eSDK as it needs the kernel-devsrc recipe to be present. Skip the test until this has been resolved. (From OE-Core rev: f83beee6e63d25ef2b17618a85f9ad6ca0898600) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: use ensure_*_package helpersRoss Burton2025-05-127-38/+11
| | | | | | | | | | | | Clean up lots of dependency checking code by using the new helpers. This means that a lot of tests that were previously skipped inside the eSDK testing on the autobuilder are now executed, and fail. (From OE-Core rev: 11277efd057685558a744e98082b5709e849dd2a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: add helpers to check for and install packagesRoss Burton2025-05-121-0/+58
| | | | | | | | | | | | | | | | | | The existing tests simply look at the manifest to determine if a test should be ran or not based on dependencies. Whilst this works for Traditional SDKs, it fails for Extensible SDKs if they've been built in minimal mode, where the manifest will be empty. However, minimal eSDKs might well have available sstate to install the missing dependencies. Add a pair of helper functions to ensure that a package is available, or skip the test. This handles nativesdk- vs -native (SDK vs eSDK) and will try to sdk-install missing dependencies into an eSDK if they're not already installed. (From OE-Core rev: d0e8b83d05957b1f22d08582e364afa4b522801e) Signed-off-by: Ross Burton <ross.burton@arm.com> 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/sdk: add simple test that the manifests are not emptyRoss Burton2025-05-121-0/+26
| | | | | | | | | | | | | Simple test to sanity check that the generated SDK manifest was parsed correctly and isn't empty. This test is complicated by the fact that minimal eSDKs without a toolchain do in fact have an empty manifest, so also check for that. (From OE-Core rev: 43288b19e93f0c07b347d6e5d6f7f10e96219f96) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdkext/context: align hasHostPackage with parent classRoss Burton2025-05-121-2/+2
| | | | | | | | | | | | This subclass overrides hasHostPackage() but back in 2018[1] the parent class's method gained a regex argument. [1] oe-core 595e9922cdb ("oeqa/sdk: fixes related to hasPackage semantics") (From OE-Core rev: cfd1e0a8c8d294510fca1a800ab27e4f1e2292bf) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/context: fix multilib handling bug in hasTargetPackageRoss Burton2025-05-121-1/+1
| | | | | | | | | | | | | | | | | | hasTargetPackage has some logic to automatically multilibify package names if needed (for example, so that gtk+3 becomes lib32-gtk+3). Due to a logic bug if multilib was True but there were no multilibs configured then this prepended "-" to the package name, which won't exist. This resulted in tests being skipped as the dependent packages are not installed. Solve this by only prepending to the package name if requested and if a multilib environment has been detected. (From OE-Core rev: 2abb146dd81f677176923ebb3188f5b7c034ed68) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/sdk: fix empty SDK manifestsRoss Burton2025-05-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SDK manifests are generated by listing the sstate was that used, but it hardcodes that the sstate data filenames end in .tgz. This has not been the case since sstate switched to Zstd[1] in 2021, which meant that all of the tests which checked for packages existing were being skipped as the manifests were empty. For example, see a representative core-image-sato eSDK test run[2]: RESULTS - cmake.CMakeTest.test_assimp: SKIPPED (0.00s) RESULTS - gtk3.GTK3Test.test_galculator: SKIPPED (0.00s) RESULTS - kmod.KernelModuleTest.test_cryptodev: SKIPPED (0.00s) RESULTS - maturin.MaturinDevelopTest.test_maturin_develop: SKIPPED (0.00s) RESULTS - maturin.MaturinTest.test_maturin_list_python: SKIPPED (0.00s) RESULTS - meson.MesonTest.test_epoxy: SKIPPED (0.00s) RESULTS - perl.PerlTest.test_perl: SKIPPED (0.00s) RESULTS - python.Python3Test.test_python3: SKIPPED (0.00s) All of those tests should have been ran. Solve this by generalising the filename check so that it doesn't care what specfic compression algorithm is used. [1] oe-core 0710e98f40e ("sstate: Switch to ZStandard compressor support") [2] https://autobuilder.yoctoproject.org/valkyrie/#/builders/16/builds/1517/steps/15/logs/stdio (From OE-Core rev: b293c44f87b6a52e4239ce14066514e87d9b08d0) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk: allow user to specify which tests to runRoss Burton2025-05-122-2/+4
| | | | | | | | | | | | | | Following the usage of TEST_SUITES in testimage, add TESTSDK_SUITES to specify the list of tests to execute. By default the variable is empty, which means to run all discovered tests. This makes it easier to work on a single test without having to run all of the tests. (From OE-Core rev: 28d437c52c77889b2ede0fc2f2d6777c5b0a553d) 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>
* spdx30: Provide software_packageUrl field in SPDX 3.0 SBOMHongxu Jia2025-05-081-0/+8
| | | | | | | | | | | | | | | | | | | Define var-SPDX_PACKAGE_URL to provide software_packageUrl field [1][2] in SPDX 3.0 SBOM, support to override with package name SPDX_PACKAGE_URL:<pkgname> Currently, the format of purl is not defined in Yocto, set empty for now until we have a comprehensive plan for what Yocto purls look like. But users could customize their own purl by setting var-SPDX_PACKAGE_URL [1] https://spdx.github.io/spdx-spec/v3.0.1/model/Software/Properties/packageUrl/ [2] https://spdx.github.io/spdx-spec/v3.0.1/annexes/pkg-url-specification/ (From OE-Core rev: c8e6953a0b6f59ffca994c440069db39e60b12d2) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> 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>
* lib/classes/conf: refactor qemu.bbclass functions into library functionsChen Qi2025-05-012-1/+55
| | | | | | | | | | | | | | | | | Move the functions in qemu.bbclass to meta/lib/oe/qemu.py as they are generally useful. The qemu.bbclass is still kept, and recipes can continue to use functions from it, though they have become wrapper functions on qemu.py functions. Note that the QEMU_OPTIONS settings are still kept in qemu.bbclass. This sets a clear barrier for people to use qemu user mode. (From OE-Core rev: 7b3563b3b3901c96c3e498799a83ab8cabcf84b4) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.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>
* sstatesig: Handle special case of llvm-project-source shared-workdirKhem Raj2025-05-011-0/+3
| | | | | | | | | | | | | | | | | bitbake-dumpsig or bitbake-diffsig tools do not work on any of tasks exposed by llvm-project-source recipe. This is due to it being a shared-workdir recipe. Fixes bitbake-diffsigs -t llvm-project-source-20.1.2 do_preconfigure NOTE: Starting bitbake server... ERROR: No sigdata files found matching llvm-project-source-20.1.2 do_preconfigure (From OE-Core rev: a6d46935939a94b8ea2b83c024aa86f05efbd7ce) Signed-off-by: Khem Raj <raj.khem@gmail.com> 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>
* cve-check: extract extending CVE_STATUS to library functionPeter Marko2025-04-241-0/+22
| | | | | | | | | | | | The same code for extending CVE_STATUS by CVE_CHECK_IGNORE and CVE_STATUS_GROUPS is used on multiple places. Create a library funtion to have the code on single place and ready for reuse by additional classes. (From OE-Core rev: 45e18f4270d084d81c21b1e5a4a601ce975d8a77) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats.py: Add tracking of network I/O per interfaceOlga Denisova2025-04-241-2/+41
| | | | | | | | | | | | | | This patch extends SystemStats to collect and store data from /proc/net/dev. It extracts per-interface received and transmitted bytes, calculates deltas between samples, and stores them for further analysis. Useful for identifying network bottlenecks during long-running builds. (From OE-Core rev: 09cbe17e43783fc6b8e3a341d564956452a04c0a) Signed-off-by: denisova-ok <denisova.olga.k@yandex.ru> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>