summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* The poky repository master branch is no longer being updated.Richard Purdie2025-11-07402-88382/+0
| | | | | | | | | | | | | | | | | | | | | You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bbconfigbuild/configfragments.py: print fragment descriptions when enabling themAlexander Kanavin2025-11-031-1/+6
| | | | | | | | | | | | Such descriptions can contain useful or important information, and users may not see that otherwise at all. To reduce clutter in CI outputs or similar scenarios, -q option suppresses that printing. (From OE-Core rev: 7d99882726cd2c2a2c162e0a2636fd7fdd330977) 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>
* bbconfigbuild/configfragments.py: replace fragment_exists() with a more ↵Alexander Kanavin2025-11-031-4/+4
| | | | | | | | | | | | | generic get_fragment() This can be used to get fragment information by its name (or None, if there's no fragment), rather than just check for its existence. (From OE-Core rev: 2ac6f564c26f2f26a003b4f0e344ae8e803e2140) 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>
* bbconfigbuild/configfragments.py: run discover_fragments() only once when ↵Alexander Kanavin2025-11-031-3/+4
| | | | | | | | | | enabling them (From OE-Core rev: f2d9519fc3aa74996654bf02d31fb6496d7a05f3) 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>
* wic: add wic tests and support setting GPT diskidSteffen Greber2025-10-301-0/+36
| | | | | | | | | | | | Also extend implementation to allow defining the diskid for GPT partitions. Add unit tests for wic.py to cover new setting. (From OE-Core rev: 0d5da9477703212d3cfb63828c5c38afdb162e43) Signed-off-by: Steffen Greber <sgreber@lilafast.org> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: test absent optional nodes in ITS filesAdrian Freihofer2025-10-301-21/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | Extend the test framework to verify that certain optional nodes are properly absent from ITS files based on configuration. The _get_req_its_paths() method now returns a tuple containing both expected and not-expected paths, enabling negative testing of conditional components. Test improvements: - Add verification for absent bootscr, setup, and ramdisk image nodes when their respective features are disabled - Extend configuration node testing with proper kernel/fdt/ramdisk field validation based on device tree and initramfs settings Code cleanup: - Remove unused tempfile module import - Sort bb_vars keys alphabetically in _test_fitimage_py() - Add debug output for bb_vars overrides when debug logging is enabled - Remove trailing empty line - Fix DTB file ordering for consistent test results (From OE-Core rev: 90dbdacc7f22120b4a96aad2a89b363fdd944079) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/rust: strip debug symbols from test binariesPeter Tatrai2025-10-301-0/+3
| | | | | | | | | | | | | | | | | | Strip debug symbols from test binaries using RUSTFLAGS='-C strip=debuginfo' to reduce binary sizes from 300+ MB to ~140 MB. This is especially critical for PowerPC mac99 which has a hardcoded 768MB RAM limit in QEMU. Without stripping, test binaries uploaded to /tmp (tmpfs) cause 'No space left on device' errors during test execution. The size reduction also benefits all other architectures by reducing memory pressure and upload times during testing. (From OE-Core rev: ede3ac6f587507f98ffbe9a8b07e21e57c27c986) Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/bblayers: Add a test to validate bitbake-setup registry schemaYoann Congal2025-10-271-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | This test validates bitbake/default-registry/configurations/*.conf.json against bitbake-setup.schema.json: INFO - test_validate_bitbake_setup_default_registry (bblayers.BitbakeLayers.test_validate_bitbake_setup_default_registry) DEBUG - Validating .../poky/bitbake/bin/../default-registry/configurations/oe-nodistro.conf.json DEBUG - Validating .../poky/bitbake/bin/../default-registry/configurations/poky-master.conf.json INFO - ... ok INFO - test_validate_examplelayersjson (bblayers.BitbakeLayers.test_validate_examplelayersjson) INFO - ... ok INFO - ---------------------------------------------------------------------- INFO - Ran 2 tests in 110.469s INFO - OK INFO - RESULTS: INFO - RESULTS - bblayers.BitbakeLayers.test_validate_bitbake_setup_default_registry: PASSED (0.92s) INFO - RESULTS - bblayers.BitbakeLayers.test_validate_examplelayersjson: PASSED (0.19s) INFO - SUMMARY: INFO - oe-selftest () - Ran 2 tests in 110.469s INFO - oe-selftest - OK - All required tests passed (successes=2, skipped=0, failures=0, errors=0) (From OE-Core rev: 86978295c228640e2c33076d1f51db9f2fe7063b) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/bblayers: Refactor JSON schema validationYoann Congal2025-10-271-7/+22
| | | | | | | | | | | | | | * Extract a function "validate_json" * Read bitbake variables in setUpClass to avoid makeing repeated calls to bitbake * Allow to specify the schema relative to $COREBASE/meta/files/ * Specify the Base URI to allow schema to reference each other (From OE-Core rev: b10b4d5b6376fd828c1cb843ea2e24da298657b6) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: runtime: weston: Remove tear down methodMathieu Dubois-Briand2025-10-271-4/+5
| | | | | | | | | | | | | | Tear down method is executed even when the tests are disabled. This lead to SSH being used to run commands on the target, and as it might fail when no SSH server is present, we had to use ignore_ssh_fails=True here. Instead, remove log file just before it is created: it will remain on the target after the test is run, but this should be acceptable. (From OE-Core rev: 8b119b1a0fa618c03fbee1bcc755785fedd2d923) Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: runtime: logrotate: Remove setup and tear down methodsMathieu Dubois-Briand2025-10-271-11/+8
| | | | | | | | | | | | | | | | | | Setup and tear down methods are executed even when the tests are disabled. This lead to SSH being used to run commands on the target, and as it might fail when no SSH server is present, we had to use ignore_ssh_fails=True here. Instead, run cleanup tasks in tests themselves and remove the tear down method. Also, the wtmp configuration file is not modified since the test was modified a few years ago: there is no need to backup and restore it. (From OE-Core rev: c90f79ae221573b2d5100f2d25b12f77e33113d7) Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* spdx_common: Fix invalid SPDX downloadLocation for Rust cratesJayasurya Maganuru2025-10-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes [YOCTO #15909] SPDX validation was failing due to the use of `crate://crates.io/...` as the `downloadLocation`, which is not a valid SPDX URL as per the 2.2 specification. This patch updates `fetch_data_to_uri()` in `spdx_common.py` to detect when the fetcher type is "crate" and instead use the `url` attribute, which contains a valid HTTP(S) URL in the expected format, e.g.: https://crates.io/api/v1/crates/<name>/<version>/download This aligns the SPDX metadata for Rust crates with the specification and avoids validation errors in tools consuming SPDX documents. Tested with the `python3-bcrypt` recipe and verified that the generated `spdx.json` contains a valid `software_downloadLocation`. Reference: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15909 (From OE-Core rev: 7cadbd1a22e18847d03b5baa902f5581d3e0aafa) Signed-off-by: Jayasurya Maganuru <Maganuru.Jayasurya@Windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fitimage: fix req_its_fields last field_indexAdrian Freihofer2025-10-271-2/+4
| | | | | | | | | | | | The last enrty of req_its_fields was not taken into account and the test passed even if the last entry was not found in the its file. (From OE-Core rev: 34e872ab23067231fb93c3b31ad5a439e9c17cb8) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Increase QEMU size to 1024 MBDeepesh Varatharajan2025-10-161-2/+3
| | | | | | | | | | | | | | | | | | | | Rightnow rust depends on llvm instead of rust-llvm Setup in rust-llvm CFLAGS:remove = "-g" CXXFLAGS:remove = "-g" Setup in llvm DEBUG_LEVELFLAG = "-g1" As a result, the stage1 compiler crate binaries include debug symbols, increasing their size. These binaries are used to run tests inside QEMU. To accommodate this, increase the QEMU RAM allocation to 1024 MB. (From OE-Core rev: 1c87bca91c61a272266a0f2763e0477b66f06c13) Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/yoctotestresultquerytest: Fix revisions to match OE-CoreRichard Purdie2025-10-141-2/+2
| | | | | | | | | The test was written assuming poky was being used. Update the revisions to match OE-Core instead. (From OE-Core rev: 5965ae92c866817a0bab54d240b1d197da37df2a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: runtime: logrotate: Fix typos and add commentsMathieu Dubois-Briand2025-10-131-15/+16
| | | | | | | (From OE-Core rev: 7d1d3b4958bc48cf49ddb653c76c8cd536babac6) Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/buildoptions: Fix test_yocto_source_mirror MIRRORS & ↵Yoann Congal2025-10-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PREMIRRORS definitions Currently, the definitions of MIRRORS and PREMIRRORS made by test_yocto_source_mirror() are overwritten when run on the autobuilder: * MIRRORS = "" is extended by mirrors.bbclass to its usual value. * PREMIRRORS = "* dl.yp.org" is overwritten by the autobuilder.conf config fragment to "" Simplified variable history: # $MIRRORS [4 operations] # set .../contribution-yocto/builds/build-qemux86-64-st/conf/selftest.inc:3 # "" # append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:57 # "${DEBIAN_MIRROR} ..." MIRRORS=" http://deb.debian.org/debian/pool ..." # $PREMIRRORS [4 operations] # set .../contribution-yocto/builds/build-qemux86-64-st/conf/selftest.inc:18 # " bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n ..." # set .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/conf/fragments/yocto-autobuilder/autobuilder.conf:6 # "" # append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:84 # "git://sourceware.org/git/glibc.git https://downloads.yoctoproject.org/mirror/sources/ ..." PREMIRRORS=" git://sourceware.org/git/glibc.git https://downloads.yoctoproject.org/mirror/sources/ ..." Despite this unexpected configuration, the test passes because after failing to find a PREMIRROR (empty), failing to download the normal SRC_URI (because of BB_ALLOWED_NETWORKS), the fetcher tries the MIRRORS which have by default download.yoctoproject.org. For example, on a failed meta-oe-mirror test[0], we can see a lot of warnings: "stdio: WARNING: ... do_fetch: Failed to fetch URL https://... attempting MIRRORS if available" By using the ":forcevariable" override, test_yocto_source_mirror() makes sure the correct value is set for MIRRORS and PREMIRRORS (whatever is the configuration). Simplified variable history (after the fix): # $MIRRORS [4 operations] # append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:57 # "${DEBIAN_MIRROR} ..." # append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:68 # "git://salsa.debian.org/.* ..." # override[forcevariable]:set .../contribution-yocto/builds/build-qemux86-64-st/conf/selftest.inc:3 # "" MIRRORS="" # $PREMIRRORS [4 operations] # set .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/conf/fragments/yocto-autobuilder/autobuilder.conf:6 # "" # append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:84 # "git://sourceware.org/git/glibc.git ..." # override[forcevariable]:set .../contribution-yocto/builds/build-qemux86-64-st/conf/selftest.inc:18 # " bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ ..." # pre-expansion value: # " bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ ..." PREMIRRORS=" bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ ..." [0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/82/builds/470/steps/17/logs/warnings Fixes [YOCTO #15993] (From OE-Core rev: ab810d1239d4db0bc0f23db31c70cc9c6e59357e) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/bblayers: fix up compatibility with integrated poky and separate ↵Alexander Kanavin2025-10-131-2/+2
| | | | | | | | | | | | | | | | | layer checkouts Specifically: - when using integrated poky, autobuilder clones it into 'build', rather than 'poky' - do not use a catch-all default to tweak the commit id openembedded-core, rather make it specific to that repository. (From OE-Core rev: 9a77dea19b0a9b07a21648e6f231d936d7387846) 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/sdk/cases/autotools.py: use gnu mirror instead of main serverSteve Sakoman2025-10-091-1/+1
| | | | | | | | | | | | | | | | ftp.gnu.org is the main server of the GNU project, however download speed can vary greatly based on one's location. Using ftpmirror.gnu.org should redirect the request to the closest up-to-date mirror, which should result sometimes in significantly faster download speed, depending on one's location. This should also distribute the traffic more across the mirrors. This information was sourced from https://www.gnu.org/prep/ftp.html (From OE-Core rev: f3046716c9c565e6f65d5169694cd3da126cfaeb) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/cases/meta_ide.py: use gnu mirror instead of main serverSteve Sakoman2025-10-091-1/+1
| | | | | | | | | | | | | | | | ftp.gnu.org is the main server of the GNU project, however download speed can vary greatly based on one's location. Using ftpmirror.gnu.org should redirect the request to the closest up-to-date mirror, which should result sometimes in significantly faster download speed, depending on one's location. This should also distribute the traffic more across the mirrors. This information was sourced from https://www.gnu.org/prep/ftp.html (From OE-Core rev: b8cd34e56819e13fd374210cf67d6952d1f2586d) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: runtime: ssh: Manage any SSH failure locallyMathieu Dubois-Briand2025-10-091-1/+1
| | | | | | | | | | This is the SSH test, it makes sense to ignore SSH failures in the SSH helper and manage them in the test body. (From OE-Core rev: 2281fd4c10e38a3cad3050b7a21a72cc7b09e718) Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: postactions: Ignore SSH errorsMathieu Dubois-Briand2025-10-091-2/+2
| | | | | | | | | | | Postactions are not part of the tests but allow to retrieve useful data from the target. They try to do this using SSH, but this can fail when no SSH server is present on the target. Ignore these fails. (From OE-Core rev: b7b3db490f9cdf99e71f114aec9fc8ad5c1d1d56) Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: runtime: Ignore SSH errors during setup and tear downMathieu Dubois-Briand2025-10-092-4/+5
| | | | | | | | | | | | | | | | | | | Tests using SSH will fail when no SSH server is present on the target. These tests are disabled in these cases, by being marked with a dependency on ssh.SSHTest.test_ssh, which in turns has a dependency on having either dropbear or openssh-sshd in the image. But setUpClass() and tearDownClass() functions are always executed, even on tests failing the dependency checks, leading to unexpected failed tests. Ignoring SSH errors in setup and tear down allows to avoid these test errors. (From OE-Core rev: 5bcc914cf5a193137cddc004f3b38b7b04af9ecb) Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: target: ssh: Fail on SSH error even when errors are ignoredMathieu Dubois-Briand2025-10-091-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Most tests running SSH commands ask for no error to be raised when the returned status is not 0. As run() will return this status, they may later use its value to do a similar check on their own, or completely ignore it. But most of the tests do not check if the non-zero status is caused by a fail of the command run on the target or by a fail of SSH itself. This can lead to confusion when the error does not come from the command executed on the target but from SSH itself: test might wrongfully be marked as PASSED or might fail with incoherent errors. As SSH errors are always reported with exit code 255, we can easily filter these. Modify OESSHTarget.run() behaviour so an AssertionError is raised on SSH failures, even when ignore_status parameter is True. Still allow to explicitly ignore this error for the rare cases where this can be needed. (From OE-Core rev: afe118d4f2de1f636b3a81dc692da35b35a3f2d7) Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipeutils/get_recipe_upstream_version: pass ud.name instead of 'default'Uwe Kleine-König2025-10-091-1/+1
| | | | | | | | | | | | | | | While all but the osc fetcher ignore the third parameter of their latest_revision implementation, 'default' isn't a valid name in general. Since commit 2515fbd10824 ("fetch: Drop multiple branch/revision support for single git urls") in bitbake a fetcher only handles a single branch/revision and the only sensible thing to pass is `ud.name`. (From OE-Core rev: cb36e8a62d7d31b75b3ddc6b84c1bdee09ebbc60) Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/meta_ide: source the environment first, then change to the sources ↵Alexander Kanavin2025-10-091-1/+1
| | | | | | | | | | | | | directory This too used to work by coincidence: sourcing the environment quietly failed without changing to the build directory, but now that it works properly, things should be done in correct order. (From OE-Core rev: ed98173057fa128ff565e1e1078b150ca14a85e0) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf,lib/configfragments: Use a new dedicated toolcfg.conf fileRichard Purdie2025-10-091-2/+2
| | | | | | | | | | | | | Rather than using auto.conf which already has established use in CI, or local.conf which users expect to own/control, start writing "tooling" controlled settings to a toolcfg.conf. This frees CI to handle auto.conf as it wants, but avoids the tooling breaking users local.conf files. (From OE-Core rev: 3f8616e56b604d7b77a12334a6ce76d265de7323) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/buildhistory: Fix test if USER_CLASSES is unsetRichard Purdie2025-10-091-1/+1
| | | | | | | | If USER_CLASSES is unset, the test was failing. Fix that. (From OE-Core rev: 7be456e675a17344aedaa65a10ecaa015bf3803a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/oescripts: Ensure buildstats is presentRichard Purdie2025-10-091-0/+4
| | | | | | | | | These tests need buildstats to be configured. Add that piece of config in case it isn't by default. (From OE-Core rev: d1962257783ed9348be9fdd2db20b7d2b7c37ce1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/bblock/fitimage/sstatetests: Fix changing MACHINE during the testRichard Purdie2025-10-093-32/+32
| | | | | | | | | | | | With config fragments, changing MACHINE in the test like this no longer works. Use the forcevarable override to allow it to work. This also needs a tweak to bitbake to work correctly, sent seperately. Whilst ugly, this avoids the need to start changing config fragments within oeqa right now. (From OE-Core rev: 2323fe87eefc8017ac93ed98b1bea24996f2276b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Fix single threaded race issueRichard Purdie2025-10-091-0/+4
| | | | | | | | | | | | | | | | oe-selftest sets up separate build directories to run the tests in. To to this, environment paths pointing at the previous build directory are updated. In the multi-threaded case this is fine as the thread is destroyed and the parent remains unchanged but in the single threaded case, the environment is broken afterwards. This can mean we try and access a directory which is in the process of being deleted (e.g. by clobberdir). Restore the environment afterwards regardless to ensure the single threaded case doesn't try and access the build directory which is now being deleted. (From OE-Core rev: a165bec28ffc75fd44b1fdb02a0d3a80c5a4769b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/bblayers: maintain compatibility with integrated poky repoAlexander Kanavin2025-10-081-1/+3
| | | | | | | | | | | This amends the recently merged commit that assumes the transition to separate repositories has already happened and re-instatates support for integrated poky. (From OE-Core rev: 517666671ba2cc79b2ada3390d4ae0f2beb95caf) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: fix PATH for wic.Wic2.test_extra_partition_pluginYoann Congal2025-10-061-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without importing PATH from the wic-tools recipes, the build host PATH is used and this test may fail depending on tools (parted, dumpe2fs, ...) availability. This triggers build faillure on AB (e.g. [0]) To fix this, import PATH from wic-tools and ensure the original environment is restored after. Since this indent a block of code into a try/finally block, here is the diff ignoring white spaces change: diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index bff3842305..bc99673d0d 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -1680,0 +1681,4 @@ INITRAMFS_IMAGE = "core-image-initramfs-boot" + oldpath = os.environ['PATH'] + os.environ['PATH'] = get_bb_var("PATH", "wic-tools") + + try: @@ -1696,0 +1701,3 @@ INITRAMFS_IMAGE = "core-image-initramfs-boot" + finally: + os.environ['PATH'] = oldpath + [0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/2456 (From OE-Core rev: 9dfd4f44d4f40e7926dc88cb564baa2345c2a24f) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: fix PATH for wic.Wic2.test_extra_partition_spaceYoann Congal2025-10-061-34/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without importing PATH from the wic-tools recipes, the build host PATH is used and this test may fail depending on tools (parted, dumpe2fs, ...) availability. This triggers build faillure on AB (e.g. [0]) To fix this, import PATH from wic-tools and ensure the original environment is restored after. Since this indent a block of code into a try/finally block, here is the diff ignoring white spaces change: diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index b1c318bd4e..34d844b90b 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -1331,0 +1332,4 @@ + oldpath = os.environ['PATH'] + os.environ['PATH'] = get_bb_var("PATH", "wic-tools") + + try: @@ -1366,0 +1371,2 @@ + finally: + os.environ['PATH'] = oldpath [0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/2456 (From OE-Core rev: a6278a199807f1ad7ed1e27ec352af46e03e8b67) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: extra partition pluginPierre-Loup GOSSE2025-10-061-1/+42
| | | | | | | | | | | | | | | | The extra_partition plugin allows populating an extra partition with files listed in the new IMAGE_EXTRA_PARTITION_FILES variable. The implementation is similar to the bootimg_partition plugin. This plugin provides an easy way to install files that are not part of the rootfs, from the deploy directory. (From OE-Core rev: 3892912bd7e047a3b122ae910ac5fbd5a85117b8) Signed-off-by: Pierre-Loup GOSSE <pierre-loup.gosse@smile.fr> Reviewed-by: Yoann CONGAL <yoann.congal@smile.fr> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/bblayers: do not assume integrated poky repoAlexander Kanavin2025-10-061-1/+4
| | | | | | | | | | | The autobuilder is being transitioned to bitbake-setup which sets up individual repositories that yocto is made of. Adjust hardcoded revisions to match these repositories. (From OE-Core rev: d22744cc176524e83cc52d0800ce39b0070e261c) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/bbconfigbuild/configfragments: disable the previous builtin fragment ↵Alexander Kanavin2025-10-062-7/+15
| | | | | | | | | | | | | | | | | | | when enabling a new one There was a flaw in the logic that allowed multiple builtin fragments with the same prefix to be enabled at the same time. The correct behaviour is that only one of them should be enabled, and when enabling it all previously enabled fragments should be removed. The issues that this caused are further explained in https://bugzilla.yoctoproject.org/show_bug.cgi?id=15987 [YOCTO #15987] (From OE-Core rev: aea2d69d0533bf005cd58eb91fd9b3a3ae194610) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.py: replace all files unconditionally when copy debug sourcesChangqing Li2025-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is for fixing reproducible issue for package like: intel-speed-select-src. For intel-speed-select, one of the debug sources is /usr/src/debug/intel-speed-select/1.0/include/linux/thermal.h, file include/linux/thermal.h under ${S} (kernel-sources) link file include/linux/thermal.h under ${B}, which link to ${S}/include/uapi/linux/thermal.h During copy debug sources, sources under ${S} copied first, then sources under ${B} is copied. mtime of ${S}/include/linux/thermal.h and ${S}/include/uapi/linux/thermal.h are decided by when it is fetched, so it is not determinate, maybe same or different. For cpio, if the in file is older than or the same as the exist file, cpio will not replace the exist file with warning "cpio: xxx not created: newer or same age version exists". And this will cause intel-speed-select-src maybe not reproducible. And option '-u' for cpio, first, this will make the copied file determistic. Second, source files under ${B} should have higher priority then ${S}, it may be generated during build, the target is more likely to use this file. (From OE-Core rev: 8898f97b4acc9d5c2c6583c91d05327f9093133e) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/bblayers.py: add tests for adding new built-in fragmentsAntonin Godard2025-10-011-0/+29
| | | | | | | | | | | | | | | | | | | | | Add discussed in [1], our best option for customizing built-in fragments is to pass them from a layer configuration. In short, the reason is that our statement must be parsed before the addfragments call is parsed.We also have to use the :append override as using += would override the original definition of OE_FRAGMENTS_BUILTIN (since it uses a ?= assignment). Provide a test case for customizing built-in fragments with meta-selftest. [1]: https://lore.kernel.org/yocto-docs/20250925-fragments-v1-0-c9f747361fb2@bootlin.com/T/#m9f7c9f110c084eba17e0f64d8b2ac7a88af3f38e Cc: Alexander Kanavin <alex.kanavin@gmail.com> (From OE-Core rev: 38cbf4c0ce5173dc3080fa0fbb3ec3e7926c8137) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest: Use raw strings for regex patternsPaul Barker2025-10-012-12/+12
| | | | | | | | | | | | This fixes several 'SyntaxWarning: invalid escape sequence' messages printed when running patchtest. Cc: Trevor Gamblin <tgamblin@baylibre.com> (From OE-Core rev: c585977a6b55db93b7f432280ae4251aa9bc6b6c) Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake-layers/create: Improve help message for layerid argumentPaul Barker2025-10-011-1/+1
| | | | | | | | | | | | | | | 'Layer ID' isn't a commonly used term in our help messages or documentation, so clarify that this is the identifier used for the new layer in BBFILE_COLLECTIONS. Also clarify that the default is the basename of the layerdir argument if a layer ID is not separately provided. (From OE-Core rev: bb8bd71b1aba31aeb0c1d2fbcae36da26865dc57) Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib/oe/recipeutils.py: Handle multi-repo recipes for upgrade checkUwe Kleine-König2025-09-251-1/+1
| | | | | | | | | | | | | | | For a recipe that uses more than one git repo there isn't a single SRCREV variable. For example for linux-yocto there is SRCREV_machine and SRCREV_meta and rd.getVar("SRCREV") yields "INVALID". Luckily bb.fetch2 already handles all the details and exposes the currently used revision in ud. So just use that. (From OE-Core rev: ddf00d6aee955878c070327ee8d751fdb6099444) Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Upgrade 1.89.0 -> 1.90.0Yash Shinde2025-09-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://blog.rust-lang.org/2025/09/18/Rust-1.90.0/ * Recent changes in rustc require 'target-c-int-width' to be an integer, not a string. This fixes type consistency when generating target specs. https://github.com/rust-lang/rust/pull/142352. * Rebase existing patches with v1.90.0. * Drop merged patches with rust v1.90.0. - backport-fix-test-string-merging.patch https://github.com/rust-lang/rust/commit/2d51acd2fbcbadb6f30709c5dd305494d413d388 * The "remote-test-server" bin is now generated in stage1-tools-bin dir rather than stage2. Update the test suite accordingly. The tests/{assembly/codegen} dirs are renamed to tests/{assembly,codegen}-llvm. Update the test suite and patches accordingly. https://github.com/rust-lang/rust/pull/144249/commits * Use "//@ ignore-riscv64" tag for tests failing on riscv-64 instead of previous "only-<target_arch>" tags. Test results summary: rust v1.90.0 +-----------+--------+---------+ | Machine | Passed | Ignored | +-----------+--------+---------+ | arm-32 | 29,517 | 1,529 | | arm-64 | 29,608 | 1,471 | | x86-32 | 29,508 | 1,507 | | x86-64 | 29,903 | 1,275 | | riscv-64 | 29,584 | 1,494 | +-----------+--------+---------+ Test results difference (1.90 - 1.89): +-----------+--------+---------+ | Machine | Passed | Ignored | +-----------+--------+---------+ | arm-32 | +278 | +61 | | arm-64 | +279 | +59 | | x86-32 | +277 | +58 | | x86-64 | +419 | +50 | | riscv-64 | +280 | +58 | +-----------+--------+---------+ (From OE-Core rev: 86d09ec9cdbcea6e076ebac6e1243f9e20fb4378) 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>
* go: remove duplicate arch map in sdk testOsama Abdelkader2025-09-221-26/+5
| | | | | | | | | | | ARCH_MAP is duplicating an existing map in meta/lib/oe/go.py use oe.go map_arch instead. (From OE-Core rev: c2ba36f41777d347fd5ffcd9b6862638e5f35a1b) Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: devtool: add missing importsAdrian Freihofer2025-09-221-6/+5
| | | | | | | | | | | | Cleanup some indirect imports. This does not solve a real problem, but it fixes some issues with IDEs that do not properly resolve indirect imports. (From OE-Core rev: b1b460c8b1c8047d9fb08287036a0b4f5446b7cb) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest: update testdata for selftestGyorgy Sarvari2025-09-182-11/+5
| | | | | | | | | | | The test-patch for test_src_uri_left_files selftest got out of date. This patch updates it to make it apply on the repo again. (From OE-Core rev: 64f1c284256852093027e494c64f1cbe63999e27) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest: ignore patch file metadata from SRC_URIGyorgy Sarvari2025-09-181-2/+2
| | | | | | | | | | | | | | | | | The test_src_uri_left_files check prepares a list of patchfiles SRC_URI from before and after the patch is applied, looking for dangling patches. The name of the files in this list can be incorrect, in case the URI contains some extra metadata (like patchdir), because os.path.basename will use the last portion of the line being processed, which is independent from the files in question. To avoid this, try to use only the first portion of URI, before any extra metadata. (From OE-Core rev: 7c0febd01e39c6d6a8b7821adcda5f397d597bee) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest: fix repo.canbemerged usageGyorgy Sarvari2025-09-182-3/+3
| | | | | | | | | | Call it like a function to avoid it being interpreted as True always. (From OE-Core rev: df73a692049675b7dc110779b7853f2e79a61737) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest: apply patch in repo rootGyorgy Sarvari2025-09-181-2/+2
| | | | | | | | | | | | | | | | | Patchtest tries to apply the received patch on the repository, without specifying the directory, which means that the CWD is used. In case the patch modifies a content in a different folder (e.g. the script is running in ./meta, but the patch modifies ./meta-selftest), the patch will be skipped, but git still returns 0, instead of complaining. To avoid such false positives, specify the working directory for applying the patch - the top of the repodir. (From OE-Core rev: 6c7bb23b05ab613d5efe8e1378d7e1b1cc8cfc45) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: add sdk testOsama Abdelkader2025-09-181-0/+128
| | | | | | | | | | | | | - Add meta/lib/oeqa/sdk/cases/go.py with GoCompileTest and GoHostCompileTest classes - Test validates Go cross-compilation toolchain functionality - Includes native compilation, cross-compilation, and Go module support - Uses dynamic architecture detection for portability (From OE-Core rev: 17015f692a6bf3697a89db51bbc4673a5efa1497) Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>