summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
Commit message (Collapse)AuthorAgeFilesLines
...
* lib/oeqa/metadata: Add commit_time to branch metadata being savedRichard Purdie2025-02-091-0/+5
| | | | | | | | | | | | As well as commit counts, it is helpful to know when metadata dates from. Store the unix timestamp for commits in a commit_time field alongside the commit count. This is useful for performance graph analysis and saves having to recompute the data. (From OE-Core rev: 56d1bc3f8f45d2f9c8ca0319c429cec562a16384) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "selftest/sstatetests: run CDN mirror check only once"Richard Purdie2025-02-061-0/+2
| | | | | | | | | | | This reverts commit 0d3901b768272abc2e27ba2ab807dad24917e0cf. We've still having CDN issues so go back to the double attempt to see if this improves things. (From OE-Core rev: 136f0edb75d9601a0ae56e025419d3cddfb90219) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/reproducible: Add a method to test a single recipeYoann Congal2025-02-051-2/+8
| | | | | | | | | | | | | | | Introduce a new variable "OEQA_REPRODUCIBLE_TEST_LEAF_TARGETS". It can be used like OEQA_REPRODUCIBLE_TEST_TARGET but will try to use sstate for the dependencies. This can be used to "quickly" test the reproducibility of a single recipe. [YOCTO #15701] (From OE-Core rev: e2440618bd12d7288a7f3f7cfb92d377ae61a3b4) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/reproducible: Move a comment to follow the line it concernsYoann Congal2025-02-051-1/+1
| | | | | | | | | | The code line was moved in commit 5a9a5ad6a7be ("reproducibility: continue testing in case of build failure") (From OE-Core rev: b4b60941153ebeb5019b26eeed593d0a1cdb4012) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/context: Improve multilib handlingRichard Purdie2025-02-011-7/+8
| | | | | | | | | | Rather than hiding the multilib logic in the package tests, move the multilib setting to the init function of the class so the logic is clearer. (From OE-Core rev: 7699867c3ce979ab615eb677a417bb5b82faecb7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: also copy local changes from the 'scripts/' dirChris Laplante2025-02-011-1/+5
| | | | | | | | | | | | | | The 'devtool' cases make a copy of 'poky', but before this patch, that only included modifications to the 'meta/' subdirectory. It's very frustrating to make changes to scripts/ and have them be silently ignored by oe-selftest. (From OE-Core rev: 35de7080c53808ade526b3b97cb54f528357deca) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/rust: Add a crate that needs the target and SDK host toolchainSean Nyekjaer2025-02-011-0/+2
| | | | | | | | | | Expand the QA tests, to test that the target and SDK host toolchains works. (From OE-Core rev: ed915e40d24a0a8b9d78374b297a9cd8090c6f9c) Signed-off-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/context: fix for gtk3 test failure during do_testsdkHarish Sadineni2025-02-011-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. (From OE-Core rev: 386e4132a9ced75599d92610cf5c0e8fe907c3b6) Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: Update create_go test.Alexander Yurkov2025-01-271-196/+16
| | | | | | | | | | | | Adjust test_recipetool_go_create test to a smaller repository. Combine test_recipetool_go_create and test_recipetool_go_replace_modules tests into test_recipetool_go_create, the new test performs both tests. (From OE-Core rev: d1256f8ff4a94d4f32b2b9ca855359dd2d691beb) Signed-off-by: Alexander Yurkov <alexander.v.yurkov@gmail.com> Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sshcontrol: Handle empty readsRichard Purdie2025-01-251-2/+4
| | | | | | | | | | | | | | Looking at some of the autobuilder failures, it seems that somehow empty reads might be possible despite not being EOF. Tweak the code to be a little more robust in handling this. In theory this shouldn't be possible but python does handle signals a bit differently (e.g. transparrently retrying syscalls for EINTR) so adding this check and a bit of code safety at least rules out this problem. (From OE-Core rev: 9d91a5674c515a43ae76d8615f72e5e2dc16c961) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/virgl: add a link to RHEL merge request to address the missing vgem ↵Alexander Kanavin2025-01-231-0/+2
| | | | | | | | | | module (From OE-Core rev: ee674a0494a667a9fd2a3691618f736f6a58fb76) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@arm.com>
* oeqa/poisoning: fix gcc include poisoning testRoss Burton2025-01-221-3/+2
| | | | | | | | | | | | | | | | | | | | | The test code in poison was flawed: as long as one CPP/CC/CXX has fatal poisoning enabled then the test passes. However, at the moment due to a bad rebase only CPP has fatal poisoning and CC/CXX do not. Rewrite the do_compile() task to more carefully check the output so the test harness itself just has to bitbake the recipe. Note that this results in the test failing: ERROR: poison-1.0-r0 do_compile: C Compiler is not poisoned. Exit status 0, output: cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories] ERROR: poison-1.0-r0 do_compile: C++ Compiler is not poisoned. Exit status 0, output: cc1plus: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories] (From OE-Core rev: 5b413d1fdb4bdbaec86d630bb52c3ccf68aae789) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/reproducible: Print error context on failureYoann Congal2025-01-141-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Printed logs during the reproducible test look like this in case of failure: 2025-01-12 00:39:00,807 - oe-selftest - INFO - Building reproducibleA (sstate allowed)... 2025-01-12 00:40:08,323 - oe-selftest - ERROR - Bitbake failed! but keep going... Log: 2025-01-12 00:40:08,323 - oe-selftest - INFO - Found ERROR (line 126): 2025-01-12 00:40:08,323 - oe-selftest - INFO - NOTE: recipe opkg-utils-native-0.7.0-r0: task do_populate_sysroot_setscene: Succeeded 2025-01-12 00:40:08,323 - oe-selftest - INFO - NOTE: Running setscene task 74 of 333 (virtual:native:.../poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.7.0.bb:do_recipe_qa_setscene) 2025-01-12 00:40:08,323 - oe-selftest - INFO - NOTE: recipe bash-5.2.37-r0: task do_populate_sysroot_setscene: Succeeded 2025-01-12 00:40:08,323 - oe-selftest - INFO - NOTE: recipe cve-update-nvd2-native-1.0-r0: task do_unpack: Succeeded 2025-01-12 00:40:08,323 - oe-selftest - INFO - NOTE: Running task 4 of 974 (.../poky/meta/recipes-core/hello-single/hello-fail_1.0.bb:do_cve_check) 2025-01-12 00:40:08,323 - oe-selftest - INFO - NOTE: recipe bash-5.2.37-r0: task do_packagedata_setscene: Succeeded 2025-01-12 00:40:08,323 - oe-selftest - INFO - NOTE: recipe hello-fail-1.0-r0: task do_packagedata_setscene: Started 2025-01-12 00:40:08,323 - oe-selftest - INFO - NOTE: Running setscene task 77 of 333 (.../poky/meta/recipes-extended/bash/bash_5.2.37.bb:do_recipe_qa_setscene) 2025-01-12 00:40:08,323 - oe-selftest - INFO - NOTE: Running setscene task 78 of 333 (.../poky/meta/recipes-core/ncurses/ncurses_6.5.bb:do_populate_sysroot_setscene) 2025-01-12 00:40:08,324 - oe-selftest - INFO - NOTE: recipe hello-fail-1.0-r0: task do_populate_sysroot_setscene: Started 2025-01-12 00:40:08,324 - oe-selftest - INFO - ERROR: hello-fail-1.0-r0 do_populate_sysroot_setscene: this is an error 2025-01-12 00:40:08,324 - oe-selftest - INFO - ERROR: hello-fail-1.0-r0 do_populate_sysroot_setscene: Error executing a python function in exec_func_python() autogenerated: 2025-01-12 00:40:08,324 - oe-selftest - INFO - 2025-01-12 00:40:08,324 - oe-selftest - INFO - The stack trace of python calls that resulted in this exception/failure was: 2025-01-12 00:40:08,324 - oe-selftest - INFO - File: 'exec_func_python() autogenerated', lineno: 2, function: <module> 2025-01-12 00:40:08,324 - oe-selftest - INFO - 0001: 2025-01-12 00:40:08,324 - oe-selftest - INFO - *** 0002:do_populate_sysroot_setscene(d) 2025-01-12 00:40:08,324 - oe-selftest - INFO - 0003: 2025-01-12 00:40:08,324 - oe-selftest - INFO - File: '.../poky/meta/recipes-core/hello-single/hello-fail_1.0.bb', lineno: 17, function: do_populate_sysroot_setscene 2025-01-12 00:40:08,324 - oe-selftest - INFO - 0013:} 2025-01-12 00:40:08,324 - oe-selftest - INFO - Found ERROR (line 127): 2025-01-12 00:40:08,324 - oe-selftest - INFO - NOTE: Running setscene task 74 of 333 (virtual:native:.../poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.7.0.bb:do_recipe_qa_setscene) 2025-01-12 00:40:08,324 - oe-selftest - INFO - NOTE: recipe bash-5.2.37-r0: task do_populate_sysroot_setscene: Succeeded 2025-01-12 00:40:08,324 - oe-selftest - INFO - NOTE: recipe cve-update-nvd2-native-1.0-r0: task do_unpack: Succeeded 2025-01-12 00:40:08,324 - oe-selftest - INFO - NOTE: Running task 4 of 974 (.../poky/meta/recipes-core/hello-single/hello-fail_1.0.bb:do_cve_check) 2025-01-12 00:40:08,324 - oe-selftest - INFO - NOTE: recipe bash-5.2.37-r0: task do_packagedata_setscene: Succeeded 2025-01-12 00:40:08,324 - oe-selftest - INFO - NOTE: recipe hello-fail-1.0-r0: task do_packagedata_setscene: Started 2025-01-12 00:40:08,324 - oe-selftest - INFO - NOTE: Running setscene task 77 of 333 (.../poky/meta/recipes-extended/bash/bash_5.2.37.bb:do_recipe_qa_setscene) 2025-01-12 00:40:08,324 - oe-selftest - INFO - NOTE: Running setscene task 78 of 333 (.../poky/meta/recipes-core/ncurses/ncurses_6.5.bb:do_populate_sysroot_setscene) 2025-01-12 00:40:08,324 - oe-selftest - INFO - NOTE: recipe hello-fail-1.0-r0: task do_populate_sysroot_setscene: Started 2025-01-12 00:40:08,324 - oe-selftest - INFO - ERROR: hello-fail-1.0-r0 do_populate_sysroot_setscene: this is an error 2025-01-12 00:40:08,324 - oe-selftest - INFO - ERROR: hello-fail-1.0-r0 do_populate_sysroot_setscene: Error executing a python function in exec_func_python() autogenerated: 2025-01-12 00:40:08,325 - oe-selftest - INFO - 2025-01-12 00:40:08,325 - oe-selftest - INFO - The stack trace of python calls that resulted in this exception/failure was: 2025-01-12 00:40:08,325 - oe-selftest - INFO - File: 'exec_func_python() autogenerated', lineno: 2, function: <module> 2025-01-12 00:40:08,325 - oe-selftest - INFO - 0001: 2025-01-12 00:40:08,325 - oe-selftest - INFO - *** 0002:do_populate_sysroot_setscene(d) 2025-01-12 00:40:08,325 - oe-selftest - INFO - 0003: 2025-01-12 00:40:08,325 - oe-selftest - INFO - File: '.../poky/meta/recipes-core/hello-single/hello-fail_1.0.bb', lineno: 17, function: do_populate_sysroot_setscene 2025-01-12 00:40:08,325 - oe-selftest - INFO - 0013:} 2025-01-12 00:40:08,325 - oe-selftest - INFO - 0014: 2025-01-12 00:40:08,325 - oe-selftest - INFO - End of log: 2025-01-12 00:40:08,325 - oe-selftest - INFO - NOTE: Running task 955 of 974 (.../poky/meta/recipes-core/hello-single/hello-fail_1.0.bb:do_populate_sysroot) 2025-01-12 00:40:08,325 - oe-selftest - INFO - NOTE: recipe hello-fail-1.0-r0: task do_populate_sysroot: Started 2025-01-12 00:40:08,325 - oe-selftest - INFO - NOTE: recipe hello-fail-1.0-r0: task do_populate_sysroot: Succeeded 2025-01-12 00:40:08,325 - oe-selftest - INFO - NOTE: Running noexec task 973 of 974 (.../poky/meta/recipes-core/hello-single/hello-fail_1.0.bb:do_build) 2025-01-12 00:40:08,325 - oe-selftest - INFO - NOTE: Running noexec task 974 of 974 (.../poky/meta/recipes-core/hello-single/hello-norepro_1.0.bb:do_build) 2025-01-12 00:40:08,325 - oe-selftest - INFO - NOTE: Tasks Summary: Attempted 974 tasks of which 958 didn't need to be rerun and all succeeded. 2025-01-12 00:40:08,325 - oe-selftest - INFO - NOTE: Generating JSON CVE summary 2025-01-12 00:40:08,325 - oe-selftest - INFO - Complete CVE JSON report summary created at: .../poky/build-master-st/reproducibleA/tmp/log/cve/cve-summary.json 2025-01-12 00:40:08,325 - oe-selftest - INFO - 2025-01-12 00:40:08,325 - oe-selftest - INFO - Summary: There were 2 ERROR messages, returning a non-zero exit code. 2025-01-12 00:40:08,326 - oe-selftest - ERROR - reproducibleA build failed. Trying to compute built packages differences but the test will fail. Fixes [YOCTO #15655] (second half). (From OE-Core rev: b3bc820e58b65a976e0abce85fcdffd067697ecf) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/reproducible: Print full log path on failureYoann Congal2025-01-141-1/+3
| | | | | | | | | | | | | Printed message looks like this: 2025-01-12 00:40:08,326 - oe-selftest - ERROR - reproducibleA build failed. Trying to compute built packages differences but the test will fail. 2025-01-12 00:40:08,326 - oe-selftest - INFO - Failure log for reproducibleA will be copied to <snip>/oe-reproducible-20250112-mza9w940/bitbake-reproducibleA.log Fixes [YOCTO #15655] (first half). (From OE-Core rev: 1c2287849a2742445d80c81d6a1c6c3e3668765e) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/sstatetests: Cover aarch64 SDKMACHINE in testsRichard Purdie2025-01-141-9/+17
| | | | | | | | | We want to ensure ARM nativesdk signatures match those for the 32 and 64 bit x86 versions. Add a test to ensure this is the case. (From OE-Core rev: dced735e2cc9663527ff8b386bf20a5e1fb9ab07) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Rework patch parsingColin McAllister2025-01-081-0/+205
| | | | | | | | | | | | | | | | | | | | | The cve_check functionality to parse CVE IDs from the patch filename and patch contents have been reworked to improve parsing and also utilize tests. This ensures that the parsing works as intended. Additionally, the new patched_cves dict has a few issues I tried to fix as well. If multiple patch files exist for a single CVE ID, only the last one will show up with the "resource" key. The value for the "resource" key has been updated to hold a list and return all patch files associated with a given CVE ID. Also, at the end of get_patch_cves, CVE_STATUS can overwrite an existing entry in the dict. This could cause an issue, for example, if a CVE has been addressed via a patch, but a CVE_STATUS line also exists that ignores the given CVE ID. A warning has been added if this ever happens. (From OE-Core rev: 87c6da681609b4f8e048eca2a27ae8e068c724e1) Signed-off-by: Colin McAllister <colinmca242@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: devtool ide-sdk use modify debug-buildAdrian Freihofer2024-12-171-1/+1
| | | | | | | (From OE-Core rev: 9ab1e35a0969af144caedcc25cd095a17d758bf9) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake-config-build: add a plugin for config fragmentsAlexander Kanavin2024-12-131-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows fine-tuning local configurations with pre-frabricated configuration snippets in a structured, controlled way. It's also an important building block for bitbake-setup. The tool requires that each fragment contains a one-line summary, and one or more lines of description, as BB_CONF_FRAGMENT_SUMMARY style metadata. There are three (and a half) operations (list/enable/disable/disable all), and here's the 'list' output: alex@Zen2:/srv/storage/alex/yocto/build-64$ bitbake-config-build list-fragments NOTE: Starting bitbake server... Available fragments in selftest layer located in /srv/work/alex/poky/meta-selftest: Enabled fragments: selftest/test-fragment This is a configuration fragment intended for testing in oe-selftest context Unused fragments: selftest/more-fragments-here/test-another-fragment This is a second configuration fragment intended for testing in oe-selftest context (From OE-Core rev: fdb611e13bd7aa00360d3a68e4818ef5f05c8944) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: replace use of rpm2cpio with rpm2archiveAlexander Kanavin2024-12-121-5/+5
| | | | | | | | | | | | | | rpm2cpio has been deprecated upstream, so this prepares for its eventual removal. rpm2archive produces a tar archive which can be uncompressed with tar executable from the host. (From OE-Core rev: ed824d3fb23f0c89d8dfdacb2c4ef0b7c21a5144) 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>
* rpm: update 4.19.1.1 -> 4.20.0Alexander Kanavin2024-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | With this release, as expected, deprecated openpgp support has been fully removed and replaced with sequoia: https://github.com/rpm-software-management/rpm-sequoia/ Alas, it's written in rust, and has no recipe, so for now signing rpm packages has to be disabled. Remove package name parameter to %prep in source archiving, as it's been dropped in the new rpm, and wasn't needed to begin with. Drop 0001-perl-disable-auto-reqs.patch (files removed upstream). (From OE-Core rev: 8c15b4577d5e554cc2dd5adfb88b816894b05a9a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Fix failure when configuration contains BBLAYERS:appendOleksandr Hnatiuk2024-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | When used with `--newbuilddir` option, it replaces relative paths in BBLAYERS variable with absolute paths by evaluating the final value of the variable, converting paths and saving result by assignment (`BBLAYERS =`) at the end of bblayers.conf. This breaks tests when bblayers.conf contains BBLAYERS:append because :append statements are evaluated after all assignments and we end up with the appended layer added twice - first by evaluating final value of the variable, then again by bitbake evaluating BBLAYERS:append. The error is as follows: AssertionError: Command 'bitbake -e' returned non-zero exit status 1: ERROR: Found duplicated BBFILE_COLLECTIONS 'layer-name', check bblayers.conf or layer.conf to fix it. (From OE-Core rev: 516c8e8f722ed0eb85a715a23b5e68d05abe9275) Signed-off-by: Oleksandr Hnatiuk <ohnatiuk@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* spdx 3.0: Rework how SPDX aliases are linkedJoshua Watt2024-12-121-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SPDX code needs to be able to look up an Element by its SPDX ID, locating the file that (should) contain the SPDX ID and opening it for parsing. Previously, the code would do this be hashing each Element SPDX ID and Alias, and the creating a symbolic link to the file that contains the element with a name of the hash. This worked well as it was possible to look up any arbitrary SPDX ID or alias by simply hashing it and following the symbolic link to get the file. However, the down side of this approach is that it creates a lot of symbolic links, since it will make one or two per Element in the document. This can be a problem when using SPDX_INCLUDE_SOURCES, for example. This change reworks this strategy so that the only Element that gets a symbolic link based on the hash is the singular SpdxDocument that is create for each file. All other Elements are assigned an alias with a special prefix that encodes the hash of SpdxDocument alias. Thus, when attempting to look up an arbitrary alias, the code sees the special prefix, extract the hash, opens the file based on the symlink with that hash name, then finds the matching Element in the file. This drastically reduces the number of symbolic links by making only one per file. This also means that the custom link extension can be removed since it is now superfluous. (From OE-Core rev: 838d64c09657ac53175737fc4e7fd6f01f3dcf47) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: Fix stack trace generation in exception handlerMathieu Dubois-Briand2024-12-091-2/+4
| | | | | | | | | | | | | | | | | | Qemurunner exception handling code currently formats the stack trace using traceback.format_exception(), with parameters introduced in python 3.10. This will fail on platforms with an older python version. Change this to the old parameter order, still supported in current python versions. https://docs.python.org/3/library/traceback.html#traceback.format_exception Fixes [YOCTO #15675] (From OE-Core rev: 5f9ecf5f210e967594069f172728fd5b4d5b4f1d) Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib: oeqa: spdx: Add tests for extra optionsJoshua Watt2024-12-051-14/+104
| | | | | | | | | | | | | | | Adds a test for several of the extra options provided by the SPDX classes. In particular, these are the options that can produce non-reproducible results, so are not enabled by default in OE core. This test takes care to configure the build so that the tests do run in a reproducible manner so that pre-built test objects can be pulled from sstate (From OE-Core rev: 14f534f15f7fe6362723d7f064d39783c5bd758f) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/gitarchive: Fix syntax warningRichard Purdie2024-12-051-1/+1
| | | | | | | | | | | The backslash characters cause syntax warnings, mark the strings are raw to avoid this. (From OE-Core rev: f717f61a37ed83618d054fc4017b5f5386fb2e3c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/gitarchive: Return tag name and improve exclude handlingRichard Purdie2024-11-231-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: 1adba3430faffdf6217b6a00533a3b48a9388abc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool: Use single space indentation in json outputRichard Purdie2024-11-231-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: a274cdcaf852cca9497f0358f44dda99c06aacbe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/reproducible: Clean up pathnamesRichard Purdie2024-11-221-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: 81a44de36e864b08687451fd85aeba7c529fd7f7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/reproducible: Drop rawlogsRichard Purdie2024-11-221-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: 5b2c70fab2ffa409b861d83f048b65d458d03a90) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemu/testimage: Ensure GNU tar is in test imagesRichard Purdie2024-11-212-1/+5
| | | | | | | | | | | | | | | | We've seen cases where a ptest (strace) has a 43GB sparse file in the test directory. busybox tar doesn't work well with this. The resulting 1.4GB archive takes hours to extract too. Ensure tar is added to our full images and use the sparse option to collect files for debugging. This stops crazy build hangs. Since tar is GPLv3, we have to exclude it from that test code. We don't boot any of those images so the debug collection code is safe there, at least for now. (From OE-Core rev: fefeb919696b6ac76f0997acfb0f612203ef7f1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/ssh: Improve performance and log sizesRichard Purdie2024-11-211-12/+32
| | | | | | | | | | | | | | | | | | The current code is not fit for purpose when handling large files via ssh. In the strace ptest case, we can end up with a 1.4GB archive being transferred for which every byte is printed into the task logfile twice over. This is then sent over bitbake IPC which compounds the problems. Make the following improvements: * when the output is large (over 64kb), don't print it * use a bytearray for better concat performance since strings are slow for this * when there is no ssh output, say that * print periodic size status output rather than the data itself since this could be binary and/or large * fix the killed process message logic which appeared broken (From OE-Core rev: e7dd009a17dc902852983a82bce41bf78bb1e242) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: add a test for bitbake "-e" and "-getvar" differenceYoann Congal2024-11-181-0/+18
| | | | | | | | | | This is a non-regression test for [YOCTO #15638] (From OE-Core rev: 22b508da24e0f7e5ad8ce4e090832bd0829963f0) 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/ping: don't bother trying to ping localhostRoss Burton2024-11-181-0/+7
| | | | | | | | | | | | | | | | | | | | If SLIRP is being used instead of TAP for networking to the guest then the target IP will be localhost. There's no point in pinging localhost to see if the target is up but whilst you'd think it is harmless, in some containers ping doesn't actually have enough rights to work: ping: socktype: SOCK_RAW ping: socket: Operation not permitted ping: => missing cap_net_raw+p capability or setuid? Look at the target address and if it's localhost or 127.0.0.* return immediately. (From OE-Core rev: a06ef43d2a50e16c32bd6edbdc7b32c3528687d5) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Remove passing test case from the exclude list in the Rust OE self-test.Deepesh Varatharajan2024-11-121-1/+0
| | | | | | | | | | | | | | We had previously excluded this test case due to failure in earlier versions. However, with the latest version of Rust, this test case is passing. As a result, we have removed it from the exclude list and added back into the test suite for execution. The rust-1.79 has been successfully tested with the current test inclusion. (From OE-Core rev: a33edee3efe67f81229496e03a098454dc7df051) Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa runtime uki.py: add testsMikko Rapeli2024-11-121-0/+16
| | | | | | | | | | If Unified Kernel Image was enabled via IMAGE_CLASSES, then target should also boot the same uki at runtime. (From OE-Core rev: 2ae651c869a19fd24b5a915451c1f99e1d7b32f0) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/container: fix IMAGE_FEATURES assignmentRoss Burton2024-11-061-3/+0
| | | | | | | | | | | | | | | | | | | | Assigning IMAGE_FEATURES="" in local.conf doesn't actually do anything useful, as bitbake.conf has IMAGE_FEATURES += EXTRA_IMAGE_FEATURES after the include of local.conf. In this test case, this results in IMAGE_FEATURES still using EXTRA_IMAGE_FEATURES, so the image contains the files installed by the post-install-logging feature. As the intention here is that container-test-image is as minimal as possible, move the IMAGE_FEATURES assignment into the image itself so it actually works, and update the expected file list to remove the post-install-logging files. (From OE-Core rev: c65349e1238ddc6634dfa4759c57e6168a355200) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/reproducibility: restart bitbake for each buildYoann Congal2024-11-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since [0], the reproducibility test tries to save logs of failed builds. Using the memory persistent bitbake prevent this by concatenating logs in the single persistent instance (See [YOCTO #15641]). So, force a BitBake server restart for each build to ensure a new log file is created. This fixes this error (seen on AB [1]): 2024-11-02 08:16:00,816 - oe-selftest - ERROR - reproducibleA build failed. Trying to compute built packages differences but the test will fail. 2024-11-02 08:16:00,819 - oe-selftest - INFO - ... ERROR 2024-11-02 08:16:00,819 - oe-selftest - INFO - Traceback (most recent call last): File "/srv/pokybuild/yocto-worker/reproducible-meta-oe/build/meta/lib/oeqa/selftest/cases/reproducible.py", line 321, in test_reproducible_builds self.copy_file(variables["BB_CONSOLELOG"], os.path.join(save_dir, "bitbake-%s.log" % name)) File "/srv/pokybuild/yocto-worker/reproducible-meta-oe/build/meta/lib/oeqa/selftest/cases/reproducible.py", line 216, in copy_file shutil.copyfile(source, dest) File "/usr/lib/python3.11/shutil.py", line 256, in copyfile with open(src, 'rb') as fsrc: ^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/srv/pokybuild/yocto-worker/reproducible-meta-oe/build/build/build-st-meta-python/build-st/tmp/log/cooker/qemux86-64/20241102071141.log' [0]: https://git.openembedded.org/openembedded-core/commit/?id=c78cc753843d4199443052e8deb0c9c3b7e4b580 [1]: https://valkyrie.yoctoproject.org/#/builders/87/builds/17/steps/40/logs/stdio (From OE-Core rev: e89bbc00ba16574d719b199c01ffbf37646f4f54) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runCmd: print stderr when that is a separate streamAlexander Kanavin2024-11-011-0/+2
| | | | | | | | | | | | | runCmd by default merges stderr into stdout, and only needs to print stdout when errors occur. When stderr is requested as a separate stream, and an error occurs, stderr is discarded, obscuring useful error messages. This changes the output to include both streams. (From OE-Core rev: 72c747b37ccdd486ddae06e3d0a99fb2b93643ba) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic: wic_sector_size add wic-tools pathVince Chang2024-11-011-44/+48
| | | | | | | | | | Add wic-tools to the PATH to avoid failures when running the wic_sector_size test case on a build host that doesn’t have parted. (From OE-Core rev: 013dcdf75669421bc38d699263cb1e8d5b95d398) Signed-off-by: Vince Chang <vince_chang@aspeedtech.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic: remove 2>/dev/null to help fail diagnosticVince Chang2024-11-011-21/+23
| | | | | | | | | | | | | | The wic test case previously used '2>/dev/null' to suppress error messages. This commit updates the code to use 'stderr=subprocess.PIPE' when calling runCmd(). Refer: https://lists.openembedded.org/g/openembedded-core/topic/109308684 (From OE-Core rev: bd26d999a0ba1107ee5629a8e238f4fe945e9be5) Signed-off-by: Vince Chang <vince_chang@aspeedtech.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/sstatetests: run CDN mirror check only onceAlexander Kanavin2024-11-011-2/+0
| | | | | | | | | | | The first no-fail check was an attempt to work around the old CDN's instability (and it didn't really help); it should not be necessary with the new CDN, and only delays a-full completion. (From OE-Core rev: 7f75c42b7fcf60a9ca58d3ded9047df675d76dc2) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Add SPDX 3.0 include source case for work-shareHongxu Jia2024-11-011-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | Build gcc and check gcc-14.2.0/README in objset is available $ oe-selftest -r spdx.SPDX30Check.test_gcc_include_source ... 2024-10-26 01:24:57,063 - oe-selftest - INFO - test_gcc_include_source (spdx.SPDX30Check.test_gcc_include_source) 2024-10-26 01:28:24,204 - oe-selftest - INFO - The spdxId of gcc-14.2.0/README in gcc.spdx.json is http://spdx.org/spdxdocs/gcc-f2eaeb0d-b54b-53ba-899a-8c36c21139bf/88d5068ffd41e5ea6b4e0dd390b23bf499bb2b6674a41e09eaf2a887eced16c8/sourcefile/42 2024-10-26 01:28:26,369 - oe-selftest - INFO - ... ok 2024-10-26 01:28:33,315 - oe-selftest - INFO - ---------------------------------------------------------------------- 2024-10-26 01:28:33,316 - oe-selftest - INFO - Ran 1 test in 216.457s 2024-10-26 01:28:33,316 - oe-selftest - INFO - OK 2024-10-26 01:28:45,254 - oe-selftest - INFO - RESULTS: 2024-10-26 01:28:45,254 - oe-selftest - INFO - RESULTS - spdx.SPDX30Check.test_gcc_include_source: PASSED (209.31s) 2024-10-26 01:28:45,260 - oe-selftest - INFO - SUMMARY: 2024-10-26 01:28:45,260 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 216.457s 2024-10-26 01:28:45,260 - oe-selftest - INFO - oe-selftest - OK - All required tests passed (successes=1, skipped=0, failures=0, errors=0) (From OE-Core rev: ccd6dde301dc8c45c8f901ebd4676b488d638b08) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Reviewed-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* reproducibility: continue testing in case of build failureYoann Congal2024-11-011-9/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current reproducibility test stops all build tasks when a single task fails (default BitBake behavior). This means that a single build failure prevents the reproducibility of other packages from being tested, which is not ideal. To address this, we now use the --continue option of BitBake during test builds, allowing the build process to proceed even when some tasks fail. The failure cases are handled as gracefully as possible. In the event of a build failure: - The entire reproducibility test will be considered a failure. - The complete BitBake log will be saved in the "saved output" directory to facilitate debugging. On the autobuilder, this log should be available at https://autobuilder.yocto.io/pub/repro-fail/. - The last 20 lines of the log, which should show the failing recipes, will be displayed in the oe-selftest console. - If BitBake fails to create the deployment directory, it will be manually created to allow the comparison process to proceed. Here is what the output looks like when testing reproducibility of bash, a failing recipe (hello-fail) and a non-reproducible recipe (hello-norepro): <snip> 2024-10-01 23:09:33,977 - oe-selftest - INFO - test_reproducible_builds (reproducible.ReproducibleTests.test_reproducible_builds) 2024-10-01 23:10:39,093 - oe-selftest - INFO - Non-reproducible packages will be copied to <snip>/yocto/repro_output/oe-reproducible-20241001-ng43_hzd 2024-10-01 23:10:39,094 - oe-selftest - INFO - Building reproducibleA (sstate allowed)... 2024-10-01 23:18:12,378 - oe-selftest - ERROR - Bitbake failed! but keep going... Log: 2024-10-01 23:18:12,379 - oe-selftest - INFO - Command 'bitbake --continue bash hello-norepro hello-fail' returned non-zero exit status 1: 2024-10-01 23:18:12,379 - oe-selftest - INFO - 2024-10-01 23:18:12,379 - oe-selftest - INFO - ... (last 20 lines of output) 2024-10-01 23:18:12,379 - oe-selftest - INFO - NOTE: Running task 976 of 990 (<snip>/yocto/poky/meta/recipes-extended/bash/bash_5.2.32.bb:do_package_qa) 2024-10-01 23:18:12,379 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_populate_sysroot: Started 2024-10-01 23:18:12,379 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_package_qa: Started 2024-10-01 23:18:12,379 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_populate_sysroot: Succeeded 2024-10-01 23:18:12,379 - oe-selftest - INFO - NOTE: Running setscene task 342 of 343 (<snip>/yocto/poky/meta/recipes-extended/bash/bash_5.2.32.bb:do_create_package_spdx_setscene) 2024-10-01 23:18:12,379 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_create_package_spdx_setscene: Started 2024-10-01 23:18:12,379 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_create_package_spdx_setscene: Succeeded 2024-10-01 23:18:12,379 - oe-selftest - INFO - NOTE: Running setscene task 343 of 343 (<snip>/yocto/poky/meta/recipes-extended/bash/bash_5.2.32.bb:do_create_spdx_setscene) 2024-10-01 23:18:12,379 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_create_spdx_setscene: Started 2024-10-01 23:18:12,379 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_create_spdx_setscene: Succeeded 2024-10-01 23:18:12,379 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_package_qa: Succeeded 2024-10-01 23:18:12,379 - oe-selftest - INFO - NOTE: Running noexec task 979 of 990 (<snip>/yocto/poky/meta/recipes-extended/bash/bash_5.2.32.bb:do_build) 2024-10-01 23:18:12,380 - oe-selftest - INFO - NOTE: Tasks Summary: Attempted 979 tasks of which 841 didn't need to be rerun and 1 failed. 2024-10-01 23:18:12,380 - oe-selftest - INFO - NOTE: Generating JSON CVE summary 2024-10-01 23:18:12,380 - oe-selftest - INFO - Complete CVE JSON report summary created at: <snip>/yocto/poky/build-master-st/reproducibleA/tmp/log/cve/cve-summary.json 2024-10-01 23:18:12,380 - oe-selftest - INFO - 2024-10-01 23:18:12,380 - oe-selftest - INFO - Summary: 1 task failed: 2024-10-01 23:18:12,380 - oe-selftest - INFO - <snip>/yocto/poky/meta/recipes-core/hello-single/hello-fail_1.0.bb:do_compile 2024-10-01 23:18:12,380 - oe-selftest - INFO - log: <snip>/yocto/poky/build-master-st/reproducibleA/tmp/work/core2-64-poky-linux/hello-fail/1.0/temp/log.do_compile.3221257 2024-10-01 23:18:12,380 - oe-selftest - INFO - Summary: There was 1 ERROR message, returning a non-zero exit code. 2024-10-01 23:18:12,380 - oe-selftest - ERROR - reproducibleA build failed. Trying to compute built packages differences but the test will fail. 2024-10-01 23:18:12,382 - oe-selftest - INFO - Building reproducibleB-extended (sstate NOT allowed)... 2024-10-01 23:46:58,451 - oe-selftest - ERROR - Bitbake failed! but keep going... Log: 2024-10-01 23:46:58,463 - oe-selftest - INFO - Command 'bitbake --continue bash hello-norepro hello-fail' returned non-zero exit status 1: 2024-10-01 23:46:58,463 - oe-selftest - INFO - 2024-10-01 23:46:58,463 - oe-selftest - INFO - ... (last 20 lines of output) 2024-10-01 23:46:58,463 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_package_write_ipk: Started 2024-10-01 23:46:58,463 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_package_qa: Started 2024-10-01 23:46:58,463 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_create_spdx: Succeeded 2024-10-01 23:46:58,463 - oe-selftest - INFO - NOTE: Running task 978 of 990 (<snip>/yocto/poky/meta/recipes-extended/bash/bash_5.2.32.bb:do_create_package_spdx) 2024-10-01 23:46:58,463 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_create_package_spdx: Started 2024-10-01 23:46:58,463 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_create_package_spdx: Succeeded 2024-10-01 23:46:58,463 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_package_qa: Succeeded 2024-10-01 23:46:58,463 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_package_write_deb: Succeeded 2024-10-01 23:46:58,463 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_package_write_ipk: Succeeded 2024-10-01 23:46:58,463 - oe-selftest - INFO - NOTE: recipe bash-5.2.32-r0: task do_package_write_rpm: Succeeded 2024-10-01 23:46:58,464 - oe-selftest - INFO - NOTE: Running noexec task 979 of 990 (<snip>/yocto/poky/meta/recipes-extended/bash/bash_5.2.32.bb:do_build) 2024-10-01 23:46:58,464 - oe-selftest - INFO - NOTE: Tasks Summary: Attempted 979 tasks of which 2 didn't need to be rerun and 1 failed. 2024-10-01 23:46:58,464 - oe-selftest - INFO - NOTE: Generating JSON CVE summary 2024-10-01 23:46:58,464 - oe-selftest - INFO - Complete CVE JSON report summary created at: <snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/log/cve/cve-summary.json 2024-10-01 23:46:58,464 - oe-selftest - INFO - 2024-10-01 23:46:58,464 - oe-selftest - INFO - Summary: 1 task failed: 2024-10-01 23:46:58,464 - oe-selftest - INFO - <snip>/yocto/poky/meta/recipes-core/hello-single/hello-fail_1.0.bb:do_compile 2024-10-01 23:46:58,464 - oe-selftest - INFO - log: <snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/work/core2-64-poky-linux/hello-fail/1.0/temp/log.do_compile.4136075 2024-10-01 23:46:58,464 - oe-selftest - INFO - Summary: There were 5 WARNING messages. 2024-10-01 23:46:58,464 - oe-selftest - INFO - Summary: There was 1 ERROR message, returning a non-zero exit code. 2024-10-01 23:46:58,467 - oe-selftest - ERROR - reproducibleB-extended build failed. Trying to compute built packages differences but the test will fail. 2024-10-01 23:46:58,481 - oe-selftest - INFO - Checking deb packages for differences... 2024-10-01 23:46:58,586 - oe-selftest - INFO - Reproducibility summary for deb: same=52 different=1 different_excluded=0 missing=0 total=53 unused_exclusions=[] 2024-10-01 23:46:58,588 - oe-selftest - INFO - Checking ipk packages for differences... 2024-10-01 23:46:58,658 - oe-selftest - INFO - Reproducibility summary for ipk: same=52 different=1 different_excluded=0 missing=0 total=53 unused_exclusions=[] 2024-10-01 23:46:58,659 - oe-selftest - INFO - Checking rpm packages for differences... 2024-10-01 23:46:58,691 - oe-selftest - INFO - Reproducibility summary for rpm: same=52 different=1 different_excluded=0 missing=0 total=53 unused_exclusions=[] 2024-10-01 23:46:58,692 - oe-selftest - INFO - Running diffoscope 2024-10-01 23:46:59,765 - oe-selftest - INFO - ... FAIL 2024-10-01 23:46:59,766 - oe-selftest - INFO - Traceback (most recent call last): File "<snip>/yocto/poky/meta/lib/oeqa/selftest/cases/reproducible.py", line 380, in test_reproducible_builds self.fail('\n'.join(fails)) AssertionError: Bitbake reproducibleA failure Bitbake reproducibleB-extended failure The following deb packages are different and not in exclusion list: <snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/deb/./core2-64/hello-norepro_1.0-r0_amd64.deb The following ipk packages are different and not in exclusion list: <snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/ipk/./core2-64/hello-norepro_1.0-r0_core2-64.ipk The following rpm packages are different and not in exclusion list: <snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/rpm/./core2_64/hello-norepro-1.0-r0.core2_64.rpm 2024-10-01 23:46:59,769 - oe-selftest - INFO - ====================================================================== 2024-10-01 23:46:59,770 - oe-selftest - INFO - FAIL: test_reproducible_builds (reproducible.ReproducibleTests.test_reproducible_builds) 2024-10-01 23:46:59,770 - oe-selftest - INFO - ---------------------------------------------------------------------- 2024-10-01 23:46:59,770 - oe-selftest - INFO - Traceback (most recent call last): File "<snip>/yocto/poky/meta/lib/oeqa/selftest/cases/reproducible.py", line 380, in test_reproducible_builds self.fail('\n'.join(fails)) AssertionError: Bitbake reproducibleA failure Bitbake reproducibleB-extended failure The following deb packages are different and not in exclusion list: <snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/deb/./core2-64/hello-norepro_1.0-r0_amd64.deb The following ipk packages are different and not in exclusion list: <snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/ipk/./core2-64/hello-norepro_1.0-r0_core2-64.ipk The following rpm packages are different and not in exclusion list: <snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/rpm/./core2_64/hello-norepro-1.0-r0.core2_64.rpm 2024-10-01 23:46:59,770 - oe-selftest - INFO - ---------------------------------------------------------------------- 2024-10-01 23:46:59,770 - oe-selftest - INFO - Ran 1 test in 2246.039s 2024-10-01 23:46:59,770 - oe-selftest - INFO - FAILED 2024-10-01 23:46:59,770 - oe-selftest - INFO - (failures=1) 2024-10-01 23:47:03,200 - oe-selftest - INFO - RESULTS: 2024-10-01 23:47:03,200 - oe-selftest - INFO - RESULTS - reproducible.ReproducibleTests.test_reproducible_builds: FAILED (2245.79s) 2024-10-01 23:47:03,203 - oe-selftest - INFO - SUMMARY: 2024-10-01 23:47:03,203 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 2246.040s 2024-10-01 23:47:03,203 - oe-selftest - INFO - oe-selftest - FAIL - Required tests failed (successes=0, skipped=0, failures=1, errors=0) => Test failed but hello-norepro is displayed as non-reproducible. The testresult.json contains: { "oeselftest_debian-12_qemux86-64_20240930000424": { "configuration": { <snip> }, "result": { "reproducible": { "files": { "package_deb": { "different": [ { "reference": "<snip>/yocto/poky/build-master-st/reproducibleA/tmp/deploy/deb/./core2-64/hello-norepro_1.0-r0_amd64.deb", "test": "<snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/deb/./core2-64/hello-norepro_1.0-r0_amd64.deb" } ], "different_excluded": [], "missing": [], "same": [ <snip> { "reference": "<snip>/yocto/poky/build-master-st/reproducibleA/tmp/deploy/deb/./core2-64/bash_5.2.32-r0_amd64.deb", "test": "<snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/deb/./core2-64/bash_5.2.32-r0_amd64.deb" }, <snip> ] }, "package_ipk": { <same as deb> }, "package_rpm": { <same as deb> } } }, "reproducible.ReproducibleTests.test_reproducible_builds": { "duration": 2146.5671875476837, "log": "Traceback (most recent call last):\n File \"<snip>/yocto/poky/meta/lib/oeqa/selftest/cases/reproducible.py\", line 380, in test_reproducible_builds\n self.fail('\\n'.join(fails))\nAssertionError: Bitbake reproducibleA failure\nBitbake reproducibleB-extended failure\nThe following deb packages are different and not in exclusion list:\n<snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/deb/./core2-64/hello-norepro_1.0-r0_amd64.deb\nThe following ipk packages are different and not in exclusion list:\n<snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/ipk/./core2-64/hello-norepro_1.0-r0_core2-64.ipk\nThe following rpm packages are different and not in exclusion list:\n<snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/rpm/./core2_64/hello-norepro-1.0-r0.core2_64.rpm\n", "status": "FAILED" }, "reproducible.rawlogs": { "log": "DIFFERENT: <snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/deb/./core2-64/hello-norepro_1.0-r0_amd64.deb\nSAME: <snip>/yocto/poky/build-master-st/reproducibleB-extended/tmp/deploy/deb/./core2-64/bash_5.2.32-r0_amd64.deb\n<snip>" } } } } => "reproducible.ReproducibleTests.test_reproducible_builds".status is correctly "FAILED" but the reproducibility of bash and hello-norepro is tested. (From OE-Core rev: c78cc753843d4199443052e8deb0c9c3b7e4b580) 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: Update the BB_HASHSERVE_UPSTREAMJose Quaresma2024-10-312-2/+2
| | | | | | | (From OE-Core rev: ec7b024725fc93b7fef881d41343c8b77d97a57c) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Remove passing test cases from the exclude list in the Rust OE self-test.Deepesh Varatharajan2024-10-291-3/+0
| | | | | | | | | | | | | | | | | There were some rust tests which were FAILing only for mips architectures. Hence, they were added to the exclusion list to avoid the failures when running rust oe-selftest for mips architectures.The current yocto framework disabled the rust oe-selftest for mips architectures.Hence, these tests have been added back to the test framework. The rust-1.79 has been successfully tested on X86, X86_64, ARM, AARCH64 and PPC Architectures with the current test inclusions. (From OE-Core rev: e1ec1ad75feb1321228bf3b52251e1aecfdb8746) Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic: add test for WIC_SECTOR_SIZEVince Chang2024-10-291-0/+50
| | | | | | | | | | Add test for WIC_SECTOR_SIZE=4096. Verified it on ext4 file system. (From OE-Core rev: 69a1f18ce18d67881d7379ccc19ca001a35acb68) Signed-off-by: Vince Chang <vince_chang@aspeedtech.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa selftest wic.py: apply build config to runqemu tooMikko Rapeli2024-10-251-1/+1
| | | | | | | | | | | | | Build configuration is applied to bitbake build command but removed before calling runqemu. Thus disabling KVM support on aarc64 host was not effective. Note that this pattern is used in a lot of tests. KVM gets enabled via CI scripts. (From OE-Core rev: 7a9fbf509fec2e149fd5702552bc4d819969ab1f) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa selftest wic.py: fix missing ext4 imageMikko Rapeli2024-10-251-0/+4
| | | | | | | | | | | | test_rawcopy_plugin fails if machine does not build ext4 images by default. Make the ext4 image build explicit in the test. Fixes test on genericarm64 machine which defaults to wic image only. (From OE-Core rev: 0344b9e7949ef854b09deb0874a45cde2861f55b) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa selftest wic.py: support UKIs via uki.bbclassMikko Rapeli2024-10-251-12/+108
| | | | | | | | | | | | | | | | | Use label to detect rootfs since UKI with kernel command line is generated before rootfs is generated by wic. Adapt wic tests to build and boot uki.bbclass generated UKIs. Keeping one UKI test in wic.py and rest of the UKI features are tested with dedicated uki.py test. Add plain non-UKI systemd-boot tests to wic suite for aarch64 and x86. (From OE-Core rev: 3f94256b977637d4276f82db7c20b8b5e57b9d86) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa selftest wic.py: add TEST_RUNQEMUPARAMS to runqemuMikko Rapeli2024-10-251-6/+10
| | | | | | | | | | | | | | | | To support "slirp" networking on shared build machines instead of tun/tap devices. Users can set TEST_RUNQEMUPARAMS = "slirp" in their build/conf/local.conf to run selftests using "slirp" networking. The same works for testimage.bbclass and oeqa runtime tests. (From OE-Core rev: 4974ec71367492ce314da63c359ccf99acfca882) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>