summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* spdx: add option to include only compiled sourcesDaniel Turull2025-07-071-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | When SPDX_INCLUDE_COMPILED_SOURCES is enabled, only include the source code files that are used during compilation. It uses debugsource information generated during do_package. This enables an external tool to use the SPDX information to disregard vulnerabilities that are not compiled. As example, when used with the default config with linux-yocto, the spdx size is reduced from 156MB to 61MB. Tested with bitbake world on oe-core. (From OE-Core rev: c6a2f1fca76fae4c3ea471a0c63d0b453beea968) Adapted to existing files for create-spdx-2.2 CC: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> CC: Joshua Watt <JPEWhacker@gmail.com> (From OE-Core rev: a2866934e58fb377a73e87576c8594988a63ad1b) Signed-off-by: Daniel Turull <daniel.turull@ericsson.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* package: export debugsources in PKGDESTWORK as jsonDaniel Turull2025-07-071-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%) (From OE-Core rev: c507dcb8a8780a42bfe68b1ebaff0909b4236e6b) Adaptations to match spdx in scarthgap: change BP to PF CC: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> CC: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: cba53212f5debf897752453364b9756a05c197de) Signed-off-by: Daniel Turull <daniel.turull@ericsson.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* sstatetests: Switch to new CDNRichard Purdie2025-06-051-1/+1
| | | | | | | | | | | The project is switching the way handle our CDN provision of sstate objects, update the URL accordingly. (From OE-Core rev: d1b64f190c1686f081f5ba2c4f2b320048f6a514) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fea96974f1ee6ae6dceb39e3ca8157797d81586c) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* patch.py: set commituser and commitemail for addNoteChangqing Li2025-04-161-6/+8
| | | | | | | | | | | | | | | | | | When PATCHTOOL is set to 'git', and user don't setup user.name and user.email for git, do_patch fail with the following error, fix by passing -c options. CmdError("git notes --ref refs/notes/devtool append -m 'original patch: 0001-PATCH-increase-to-cpp17-version.patch' HEAD", 0, 'stdout: stderr: Author identity unknown *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" (From OE-Core rev: 9de38ac99c2b19f549c00ea5277faf621c6f4e65) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/rust: correctly form the PATH environment variableAlexander Kanavin2025-02-121-3/+2
| | | | | | | | | | | | | | | | | | | | There were two issues here: - the path to native python was not included, so the test suite was running with host python, causing failures due to host python being given native libraries: https://autobuilder.yoctoproject.org/typhoon/#/builders/148/builds/1711/steps/12/logs/stdio (rust recipe uses native python throughout) - tmp/hosttools was listead ahead of native-sysroot/usr/bin (From OE-Core rev: 72156282059aa5a013a386eb95f89dc38726326e) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit aec96b5aec8d6b4a5ae8a719ca05bb727a6197cb) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/rust: skip on all MIPS platformsRoss Burton2025-02-121-5/+3
| | | | | | | | | | | | | | | | | | | | | As per "The rustc book"[1], mips*-unknown-linux-* are "tier 3" targets: Tier 3 targets are those which the Rust codebase has support for, but which the Rust project does not build or test automatically, so they may or may not work. We already skip qemumips in this selftest, but we're now also seeing failures with qemumips64 so refactor the test to skip all machines where the architecture is mips or mips64. [1] https://doc.rust-lang.org/nightly/rustc/platform-support.html (From OE-Core rev: 681f5ea8d6a5050aebfb1f656da9ba679433e366) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 177e268811c04260923ac4b16fa047315304add0) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/sdk/context: fix for gtk3 test failure during do_testsdkHarish Sadineni2025-02-121-5/+7
| | | | | | | | | | | | | | | | The do_testsdk for lib32-core-image-sato aborts with below error: configure: error: Package requirements (gtk+-3.0) were not met: No package 'gtk+-3.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. This causes due to an absolute path name in 'sdk_env', which is now stripped to have only the environment name. Backport from oe-core master: https://git.openembedded.org/openembedded-core/commit/?id=386e4132a9ced75599d92610cf5c0e8fe907c3b6 (From OE-Core rev: 83c3e40e2361d771a724062e38a1349b87059c75) Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oe-selftest: devtool ide-sdk use modify debug-buildAdrian Freihofer2025-02-031-1/+1
| | | | | | | | (From OE-Core rev: 1528d6aa060811402eaecb1a9fe16bfec0417c98) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* rust: build the default set of toolsAlexander Kanavin2025-01-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Setting it explicitly replaces rust's default choice which is rustdoc (needed for example in selftests and otherwise expected to be present in typical rust installations): https://github.com/rust-lang/rust/blob/master/config.example.toml#L320 This addresses some of the rust selftest failures but not all. Help is appreciate to restore the selftest. Unfortunately, this also breaks rust reproducibility (or rather exposes that it was never properly fixed, as explained here: https://lists.openembedded.org/g/openembedded-core/message/199288 ) (From OE-Core rev: 4d739fe248d1023eb2c3c040fc4d33273dd16bc1) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 58eaf2ee6c0809bf0a0d3c1d177e62bda7241651) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/ssh: allow to retrieve raw, unformatted ouputAlexis Lothoré2025-01-241-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | The ssh target is currently well tailored to easily retrieve textual output from a command run on a remote target. It could also be used to retrieve raw data from a command run onto a remote target (for example, to feed this data directly to another program), but it currently suffers two minor issues preventing such use case: - stderr is piped to stdout, so any error log will be mixed in the program output - the final output is decoded as utf-8 and stripped Allow to return the raw, unmodified output by adding an optional "raw" parameter. Keep it to False by default to preserve the current behavior. When enabled, do not return a string but the raw output as bytes. (From OE-Core rev: 8d05dc6e2284b7ed7c32a8215b9c8bf6f7dabf00) (From OE-Core rev: d09187db648053a763036a5209efd584b352cf31) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/utils/gitarchive: Return tag name and improve exclude handlingRichard Purdie2024-12-091-1/+3
| | | | | | | | | | | | | Tweak the gitarchive exclude handling not to error if excluded files don't match. Also return the tagname created so that other code can then use it. (From OE-Core rev: 0a5b4fabf8bf9b559295bb4d2583809ca11522f4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1adba3430faffdf6217b6a00533a3b48a9388abc) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* resulttool: Use single space indentation in json outputRichard Purdie2024-12-091-1/+1
| | | | | | | | | | | | | Using 4 space indentation in resulted in hundreds of megabytes of extra file size in general use. Reduce this to make filesizes more managable and reduce the processing cost. Some level of indentation and spacing does make the files more readable and allows use of git diff so we need to retain some of it. (From OE-Core rev: 03fef3a99186863a0c460bd89bad40f2360a6930) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a274cdcaf852cca9497f0358f44dda99c06aacbe) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/reproducible: Clean up pathnamesRichard Purdie2024-12-091-1/+1
| | | | | | | | | | | | | | | | | | | There are several problems with these paths. Firstly they contain full system paths which depend upon where the test was run. These are pretty pointless and just take up a lot of space making the results files large. Secondly, they contain the same path twice. The reference and target path will always be the same thing in two different locations. Strip off the prefix and remove the duplication. This does change the output data but that can't really be avoided. It does shrink the results data and makes it more readable. (From OE-Core rev: 44ee8f69db5e008b5ac5e0dbf390bb4fcf704f07) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 81a44de36e864b08687451fd85aeba7c529fd7f7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/reproducible: Drop rawlogsRichard Purdie2024-12-091-6/+0
| | | | | | | | | | | | | | | The "rawlogs" data consists of a long string of results data which is already in a structured data format. I can't see this is adding much value in duplciating the data but it does create a huge string with a lot of long problematic pathnames and inflates the results data size. I suggest we drop this data as obsolete and not necessary. (From OE-Core rev: 296f64cbf83c40759b368526335502a6b130aa14) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5b2c70fab2ffa409b861d83f048b65d458d03a90) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* do_package/sstate/sstatesig: Change timestamp clamping to hash output onlyRichard Purdie2024-12-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code was changing the timestamps of the files in the do_package output, particularly the files added for debug sources. This was to do two things: a) make do_package sstate more reproducible b) ensure better hash equivalence matching Unfortuately the debug source files are hardlinks into the source tree for efficiency so touching these, touches a lot of files in ${B} and ${S}. This causes unpredictable effects if compile is run again for example, or could cause compiling in the install task. The hash equivalence matching is of key importance but we can mimic that using clamping of the file timestamps in the depsig output used to generate the hashes. This patch drops the global timestamp clamping, instead allowing the files to retain their creation timestamps into sstate. This makes do_package sstate slightly less reproducibile. We could clamp the sstate timestamps but that would lead to two different sets of timestamps depending on whether the data came from sstate or not. I'd prefer to have consistent code behaviour, rather than differing behavhour depending on whether data came from sstate or not. If we wanted to have reproducibiliy and fix the "corruption" of S/B and have consistent codepaths, the only other option would be two copies of the sources, which could end up huge and seems the least desireable option. This patch therefore drops the timestamp clamping in the sstate files and tweaks the depsig data generation to clamp the timestamps for do_package instead since this seems the best compromise. I validated that rpm/deb/ipk files still generate correctly as before. (From OE-Core rev: 9df0bf5775ec96773e77c489ba6a443037d65ab6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 475759fdab7200488b2a568b2ba1aa31a456d113) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* rootfs: Ensure run-postinsts is not uninstalled for ↵Gassner, Tobias.ext2024-12-062-1/+44
| | | | | | | | | | | | | | | | | | | read-only-rootfs-delayed-postinsts This patch ensures that pkg_postinst_ontarget task is executed for read only rootfs when read-only-rootfs-delayed-postinsts is set as IMAGE_FEATURES. The issue was that run-postinsts could be uninstalled at the end of rootfs construction and that shouldn't happen for the delayed usecase. In addition to the fix, a test in meta/lib/oeqa/selftest/cases/overlayfs.py testing the fix has been implemented. (From OE-Core rev: e0c4f2f69723f64a29ba35c4de5fb1a7c79ef718) Signed-off-by: Gassner, Tobias.ext <tobias.gassner.ext@karlstorz.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 60f587475dda99eaa07848880058b69286b8900e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* qemurunner: Clean up serial_lock handlingRichard Purdie2024-11-261-5/+6
| | | | | | | | | | | | Avoid "RuntimeError: release unlocked lock" since the lock shouldn't be locked even in the error path. Add a try/finally path to ensure this. (From OE-Core rev: 78f86c946d37d15b044be158e22e9853009cae27) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b0732ee009ca47580d1d2ad75334f4aa50e6efd5) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime/ssh: Fix incorrect timeout fixRichard Purdie2024-11-261-2/+2
| | | | | | | | | | | I'd meant to change the command timeout in the previous change, fix the correct one. (From OE-Core rev: 419c96d17205fc9485869ab0fc1f27de52c31789) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bb991988cb23be2c8947171726ada321f27e6eed) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime/ssh: Rework ssh timeoutRichard Purdie2024-11-261-2/+2
| | | | | | | | | | | | | | | | | | After the changes to improve this test, we keep seeing image testing ssh failures, particularly on mips. It looks like part of the problem is that on a loaded system, 5s is too short for mips to reliably establish an ssh connection. I've seen logs where it keeps timing out and fails to work, then the debug code successfully uses ssh later after everything else fails. Change the timings/retries to give slow platforms enough time to respond. (From OE-Core rev: 55780565831a1a5fa292d82b2b04943fb9ddc82e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ba64ccf3ad6e40461219b72d60eb0fe5cb38fddd) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* image.bbclass: Drop support for ImageQAFailed exceptions in image_qaPeter Kjellerstedt2024-10-181-13/+0
| | | | | | | | | | | | | | | | | | | | | | After commit 905e224849fbbed1719e0add231b00e2d570b3b4 (image_qa: fix error handling), any unexpected exceptions in do_image_qa() would result in a variable being set, but never used, effectively hiding the error. Since image_qa now calls oe.qa.exit_if_errors(), remove the support for oe.utils.ImageQAFailed and instead rely on the called functions to call oe.qa.handle_error() themselves. This matches what do_package_qa() does. Also update the description of do_image_qa() to explain that the called functions are expected to call oe.qa.handle_error() themselves. [ YOCTO #15601 ] (From OE-Core rev: a1b28a88bc7697371ab166b18587b615d6d39c8e) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0c3e111c965af2bc56533633c376b70b7fa5e1de) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* meta-ide-support: Mark recipe as MACHINE-specificPaul Barker2024-10-181-2/+2
| | | | | | | | | | | | | | | | | | meta-ide-support:do_write_test_data dumps the bitbake data dictionary to a file using export2json(). As this obviously includes the value of MACHINE, and other MACHINE-specific variables, the recipe needs to be marked as MACHINE-specific. RP: Note that this patch does change the name of the environment script since it is no longer package arch specific but machine arch specific. [RP: Fix selftest to reference new environment file] (From OE-Core rev: bec6b535c9a817a5ed51453bcb9ecae0b81a8590) Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3be2bc8a9b0c9d6a178329c8b451a6bedf255d6c) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* image_qa: fix error handlingLouis Rannou2024-10-181-1/+1
| | | | | | | | | | | | | | | | | | Make ImageQAFailed inherit BBHandledException so exceptions raised in tests are catched when the actual test function is executed by bb.utils.better_exec. Change the do_image_qa tasks so errors are handled with oe.qa.handle_error. Add some comment to explain this requires to list the test in ERROR_QA or WARN_QA. [YOCTO #14807] https://bugzilla.yoctoproject.org/show_bug.cgi?id=14807 (From OE-Core rev: 8fe7aef17eefa70e3f7c07077b8c695e5c00ed5e) Signed-off-by: Louis Rannou <louis.rannou@non.se.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 905e224849fbbed1719e0add231b00e2d570b3b4) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* lib/oe/package-manager: skip processing installed-pkgs with empty globsClaus Stovgaard2024-10-181-39/+37
| | | | | | | | | | | | | | | | | | We can skip processing the installed-pkgs file if globs is empty. This is the case if self.d.getVar for IMAGE_INSTALL_COMPLEMENTARY returns an empty string. If globs is an empty string the result from processing with empty glob in oe-pkgdata-util will always be 0 packages to install. Instead of return early on this we just skip and still generate the locale archive if needed. (From OE-Core rev: f944a1be484378c733d7fd835dc17e210f1c2705) Signed-off-by: Claus Stovgaard <claus.stovgaard@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 160c45c83d5addf01e4834cf896af871bd6fca7f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/postactions: fix exception handlingAlexis Lothoré2024-09-251-1/+1
| | | | | | | | | | | | | | | | | The current exception handler in list_and_fetch_failed_tests_artifacts expects a non-exisiting variable and then fail to display the original exception message since it raises a new one. The issue has been introduced with commit 6e80b2ab660e ("oeqa/utils/postactions: transfer whole archive over ssh instead of doing individual copies"). Now that tests artifacts are now handled individually, there's no point of trying to print individual names in the exception. (From OE-Core rev: 60a7448abce091eb8c1cb953058fade0beb8b670) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a50e72bb64fb8b0d14c23164eaeeabd9c271ac19) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime/ssh: increase the number of attemptsJon Mason2024-09-091-1/+1
| | | | | | | | | | | | | Under high load, the ssh test is hitting the amount of retries. Increase it to 20 to avoid this issue. This would increase the maximum failure time from 50 seconds (5 * 10) to 100 seconds. (From OE-Core rev: 4581b5793f310d2f1f0c80bfe1a5f8743416c4fc) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c796438eec5dd6b4671b798f85506bc89ff402ab) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/utils/postactions: transfer whole archive over ssh instead of doing ↵Alexis Lothoré2024-08-261-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | individual copies Fixes [YOCTO 15536] The postactions retrieval actions currently rely on scp executed individually on any file or directory expanded from TESTIMAGE_FAILED_QA_ARTIFACTS. Unfortunately, symlinks are not preserved with this mechanism, which lead to big storage space consumption. Things may go even worse if those symlinks create some circular chains. This mechanism then needs to be updated to preserve symlinks instead of following them during copy. There are multiple ways to do it: - create a local archive on the target and execute scp on this file - use rsync instead of scp for all files - create an archive and pipe it to ssh instead of storing it onto the target The first solution may create pressure on targets storage space, while the second assumes that rsync is installed on the target, which may not be true. So the third one is a compromise: tar is very likely present, at least through busybox, and no disk space is used on the target. Replace the current per-file scp call by a single call to tar run on the target. Retrieve the generated compressed archive directly from SSH output, and feed it to another tar process but on host, to uncompress and extract it at the same place as before. (From OE-Core rev: 8b5c66c91d94f4c8521fe9443e65d86063dba5e5) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4aeb10aa38efc6768928fbb74985e36e972b8e46) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/reproducibile: Explicitly list virtual targetsRichard Purdie2024-08-261-1/+2
| | | | | | | | | | | | | | | | | | We're seeing reproducibility failures where some packages don't appear in the "from sstate" builds. The common factor is these are all recipes with PROVIDES = "virtual/XXX". In a full build from scratch, these are build but in a build from sstate, there are situations where they aren't. For now, to try and keep builds working, work around the problem until we can better look into the problem. It is likely recent taskhash imrovements have caused this to occur more regularly. (From OE-Core rev: 9f0eba6aba5e9b37975f86556c1234b145a0859e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 68086a333acc54390e4e589ef928dc90da3edb48) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime/ssh: check for all errors at the endJon Mason2024-08-261-3/+3
| | | | | | | | | | | | | | | | | With the retry for the -SIGTERM, it is possible to still see that error after the 5th attempt and mark the run a success. Check for any non-zero status in the final check and error out to close the gap. While there, make the error print match the one above and be a little more verbose. Also, I'm seeing it take roughly 6 attempts on my local (very slow) system to pass. So, increasing the number of attempts to 10. (From OE-Core rev: 52a67132d4d7e656a39d87c03b1c6162018e8908) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3c3ebe591eef6e0479d623ec2237cfea16db5c80) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime/ssh: In case of failure, show exit code and handle -15 (SIGTERM)Richard Purdie2024-08-261-2/+5
| | | | | | | | | | | | | Ensure we show the failing exit code in case of failures. We're seeing autobuilder failures with -15 (SIGTERM) which is probably from slow boot/init. Retry in these cases for now. (From OE-Core rev: 1bd6b0e29650c34652c1027b6975eb8620a73c55) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 127d3bd8d5509ae17e359c1365859fd362ffc74f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime/ssh: add retry logic and sleeps to allow for slower systemsJon Mason2024-08-261-9/+19
| | | | | | | | | | | | | | | | | On exceptionally slow systems, the ssh test can intermittently fail due to a race between when ping works and the networking applications being brought up. To work around this issue, add some retry logic when ssh fails to connect. According to the man page of ssh, "ssh exits with the exit status of the remote command or with 255 if an error occurred." So, only retry if the return code is 255, and limit the number of retries to prevent it looping forever. (From OE-Core rev: f6eacc39dc44c6b3dea9c44836addce5d03f20ef) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f0fe0b490d309cdf1c97754f85a61b5b948b7f28) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa sdk cases: Skip SDK test cases when TCLIBC is newlibMark Hatle2024-08-066-0/+26
| | | | | | | | | | | | | | Newlib generally requires additional components to function. Skip the cases where newlib is known to not work. (From OE-Core rev: 99a5ca1c2c2b7b3193710bc681fbf05936025b5b) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b9934755554e40d9980b90c3d541f4c702203561) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest-hardlink: Add additional test casesMark Hatle2024-08-061-0/+26
| | | | | | | | | | | | | | | | | Additional test cases for debug symlink generation both binaries and static libraries. This also has the side effect of testing for race conditions in the hardlink debug generation and stripping. (From OE-Core rev: 39823d3211411e661320e1164ba4c50370804425) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7171f41c07a39a7543bb64f075d38b8e74563089) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* package.py: Fix static library processingMark Hatle2024-08-061-9/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | When PACKAGE_STRIP_STATIC is enabled the system did not pay attention to hardlinks. This could trigger a race condition during stripping of static libraries where multiple strips (through hardlinks) could run at the same time triggering a truncated or modified file error. The hardlink breaking code is based on the existing code for elf files, but due to the nature of the symlinks needed to be done in a separate block of code. Add support for static-library debugfs hardlinking through the existing inode processing code. Print a note to the logs if the link target can't be found. This isn't strictly an error, but may be useful for debugging an issue where a file isn't present. (From OE-Core rev: c2809691992dab48a360c9516d205ec031378cda) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ff371d69f60a1529ed456acb7d8e9305242e74bd) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* package.py: Fix static debuginfo splitMark Hatle2024-08-061-0/+1
| | | | | | | | | | | | | | Fix: NameError: name 'shutil' is not defined (From OE-Core rev: a9d8e3f12032c92fa8dd7f2ad40f618da5ee281a) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 13bdd750ae54d57a5f459e4b7d8636c864978241) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime/scp: requires openssh-sftp-serverJose Quaresma2024-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | The SCP protocol was deprecated in favor of the SFTP. For the legacy SCP protocol scp should be run with "-O". Instead of adding "-O" on the scp_options ssh oeqa we can require the openssh-sftp-server to be instaled on the target. This way the test will work more deterministic regardless of the host machine client used. For the old fashion clients still using legacy SCP protocol the openssh-sshd server will be used, for the new ones using the SFTP the openssh-sftp-server will be picked. (From OE-Core rev: 7629a47d6cac36c78184788010f754175853bb03) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 2f43da91ba20d18bc419bca7651bb383a51f20af) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime: fix race-condition in minidebuginfo testEtienne Cordonnier2024-08-011-4/+13
| | | | | | | | | | | | | | | | | | | | Fix this error where 'coredumpctl info' warns that the coredump is still being processed: ``` AssertionError: 1 != 0 : MiniDebugInfo Test failed: No match found. -- Notice: 1 systemd-coredump@.service unit is running, output may be incomplete. ``` (From OE-Core rev: ad1ce64f5c1f22a7b10025d8cba20dc74354ac81) (From OE-Core rev: f7e824477ef75fcea8e0b777278413304def631c) Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ed562345d5a5f2edb649028553199f3f7966e19e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/sdk/case: Ensure DL_DIR is populated with artefacts if usedRichard Purdie2024-08-011-3/+6
| | | | | | | | | | | | | Where we're using DL_DIR in sdk archive to try and cache testing artefacts, copy into the cache so that it gets populated and this doesn't have to be done manually. Currently we're making a lot of repeat requests to github as this wasn't being populated. (From OE-Core rev: 048467673ceb075277c5a4fbbb40b9c3e41864e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a3284958a2cc6c90a5fac26976bddc23f821c972) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime: make minidebuginfo test work with coreutilsEtienne Cordonnier2024-08-011-1/+2
| | | | | | | | | | | The test was failing with core-image-full-cmdline which uses sleep from coreutils instead of sleep from busybox. (From OE-Core rev: 2b71641b9c1b8f7e67527d2242a6a65b1e849ded) Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8497edf0c56da34ea7b7509b8fcd46fcba2fd0e3) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime: fix regression in minidebuginfo testEtienne Cordonnier2024-07-261-1/+2
| | | | | | | | | | | | The builtin command "sleep" was getting executed instead of the busybox binary. Hence "pidof sleep" was empty and the test was failing. (From OE-Core rev: dfde05c64a7d9f01f09a34e76509ef80501f0db7) Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3188f3f0718b8a59bc9e3cae4cdf74e82bdb86c3) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/cases/runtime_test: Exclude centos-9 from virgl testsRichard Purdie2024-07-171-1/+1
| | | | | | | | | | | Similarly to centos 8, centos 9 doesn't support the render device we need for this test. (From OE-Core rev: 37ddcbd51ec39e5df94b307085cec2a045fea4a1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c2be3afabf84f287c90b61ae2509728a6634fb8f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/devtool: Fix for usrmerge in DISTRO_FEATURESRichard Purdie2024-07-091-0/+2
| | | | | | | | | | | If usrmerge is in DISTRO_FEATURES, assumptions in one of the tests would fail. Improve the test so it works in both cases. (From OE-Core rev: 4dc35667143f19a369bdea9ce2f011a04132509c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit afa211746a2aa1993a54cc5a5e1937679341da8e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/recipetool: Fix for usrmerge in DISTRO_FEATURESRichard Purdie2024-07-091-5/+11
| | | | | | | | | | | If usrmerge is in DISTRO_FEATURES, assumptions in one of the tests would fail. Improve the test so it works in both cases. (From OE-Core rev: 01ccccb949bd82e89dae4679ff5b30ada6672d9a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 68a27d307a7042e242c49cf3d069469f40e09902) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/sdk/assimp: Upgrade and fix for gcc 14Richard Purdie2024-06-201-4/+4
| | | | | | | | | | | To enable this test to work with gcc 14, pass the option to make warnings non-fatal. Also upgrade to version 5.4.1 from 5.3.1. (From OE-Core rev: c0c58c9acbcbed26f95864dc5e40b5995252ce4a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c3df6287ae26dc9d7f11eb7e26fdbcaefe4dfead) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/sdkext/devtool: replace use of librdfaRoss Burton2024-06-201-4/+3
| | | | | | | | | | | | | librdfa hasn't had a commit for a decade now and as such has problems with modern compilers (specifically gcc 14.1). Switch the recipe creation test to something much simpler that we also control: dbus-wait. (From OE-Core rev: 311e7b5b9ee4f0d96a376a06f01c5bfd379ca244) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d801de1f702d8d0def55011b5b6ad39d85f978f1) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* Revert "oeqa/selftest/devtool: fix test_devtool_add_git_style2"Alexandre Truong2024-06-191-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit ab6d3e3d645ffc343f434bf731339fa237df027a from poky repository. The previous reverted commit was a workaround. The fix "oeqa/selftest/devtool: fix _test_devtool_add_git_url" tackle the issue. So, the workaround is not needed anymore. (From OE-Core rev: fd30cc2ab99fe6a8e4beb29d9cb46a772db8b8d8) Signed-off-by: Alexandre Truong <alexandre.truong@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 731f47ecfd8ad6558aac629806810789c623986b) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/devtool: fix _test_devtool_add_git_urlAlexandre Truong2024-06-191-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a follow-up to the bug#15466. As a reminder, the bug was about devtool’s submodule detection checking for HEAD when a version is being passed. As Vincent Kriek pointed out: the --version that is being passed to devtool is only used for setting the PV value in the recipe. To take into account the tag, we add --srcrev to the command: devtool add --srcrev v3.1.0 --version v3.1.0 mbedtls git://git@github.com/ARMmbed/mbedtls.git;protocol=https Changes to _test_devtool_add_git_url have been made to take into account the srcrev. srcrev will be passed as an optional parameter because the test_devtool_add_git_style1 does not need the srcrev contrary to test_devtool_add_git_style2 Fixes [YOCTO #15466] (From OE-Core rev: c297b78454da2a668e62dec95d7b6eb6e5429480) Signed-off-by: Alexandre Truong <alexandre.truong@smile.fr> Reported-by: Alexandre Truong <alexandre.truong@smile.fr> Suggested-by: Vincent Kriek <vincent@coelebs.dev> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a8686f3641e4407dee3d807898ffd620e2732b78) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa: selftest: context: run tests serially if testtools/subunit modules are ↵Julien Stephan2024-06-191-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not found If testtools and/or subunit modules are not found we get the following backtrace (example for testtools): NOTE: Starting bitbake server... Traceback (most recent call last): File "<..>/poky/scripts/oe-selftest", line 60, in <module> ret = main() File "<..>/poky/scripts/oe-selftest", line 47, in main results = args.func(logger, args) File "<..>/poky/meta/lib/oeqa/selftest/context.py", line 391, in run rc = self._internal_run(logger, args) File "<..>/poky/meta/lib/oeqa/selftest/context.py", line 377, in _internal_run rc = self.tc.runTests(**self.tc_kwargs['run']) File "<..>/poky/meta/lib/oeqa/selftest/context.py", line 161, in runTests return super(OESelftestTestContext, self).runTests(processes, skips) File "<..>/poky/meta/lib/oeqa/core/context.py", line 91, in runTests result = self.runner.run(self.prepareSuite(self.suites, processes)) File "<..>/poky/meta/lib/oeqa/selftest/context.py", line 154, in prepareSuite from oeqa.core.utils.concurrencytest import ConcurrentTestSuite File "<..>/poky/meta/lib/oeqa/core/utils/concurrencytest.py", line 22, in <module> import testtools ModuleNotFoundError: No module named 'testtools' Fix this by adding a custom callback on -j/--num-processes parameter to check testtools and subunit modules. Fallback to serial testing if missing. This strategy is already used in sdk/context.py (From OE-Core rev: ffd1db7d7813f6da22c0d9ef5fde6738058f1eb2) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 35284404473b2c2d9f69594582868ed66ef3525e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/postactions: Do not use -l option with dfKhem Raj2024-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | -l option is specific to df provided by coreutils, if df applet from busybox is used then it does not work and fails like below Fixes df: invalid option -- 'l' BusyBox v1.36.1 () multi-call binary. Usage: df [-PkmhT] [-t TYPE] [FILESYSTEM]... DEBUG: [Command returned '1' after 0.71 seconds] DEBUG: Command: df -hl Status: 1 Output: df: invalid option -- 'l' it seems worth a compromise to show remote mounted filesystems if any during ptests and it works with both df implementations (From OE-Core rev: 82a0df6cc2c5b18cb48fd8c3be26a11f4016d98d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 75cc1ea4348a2294fdc5ab20530fcff27056ff06) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/devtool: add test for modifying recipes using go.bbclassOla x Nilsson2024-06-191-0/+19
| | | | | | | | | | | | | | | | go.bbclass uses a special do_unpack function that causes the git root to be different from S. Verify that it unpacks as expected. [ YOCTO #15483 ] (From OE-Core rev: 71adf7c18215faf73454be79d7b51f2a0c338c0f) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fab0c737b95b8d0c0bbf58336bc308776c956406) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* ipk: Fix clean up of extracted IPK payloadPhilip Lorenz2024-06-051-4/+2
| | | | | | | | | | | | | | | | | It turns out that the IPK payload tarball was actually cleaned up in the concrete package manager implementation (most likely because at some point Debian and IPK packages used different compression algorithms). Globbing removes this ambiguity so move the removal of the payload into the common extract method. (From OE-Core rev: ec1c6bc79f5ca219e77a379bbabc2dad808d2020) Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1e2b02a54f482159e21902eeb997b21e00e9588e) Signed-off-by: Steve Sakoman <steve@sakoman.com>