summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
Commit message (Collapse)AuthorAgeFilesLines
* oeqa/core/decorator: add decorators to skip based on HOST_ARCHRoss Burton2025-07-181-0/+24
| | | | | | | | | | | | | | | There are already decorators to skip on the value of MACHINE, but for flexibility it's better to skip based on the target architecture. This means, for example, the ISO image tests could skip if the architecture isn't x86. (From OE-Core rev: a8381f4b7d7c294d9ad8a9d3f0b1f7c409753716) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 0c21ff0a92906b6b4820eb8beddf8762fe70653d) Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.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: 2df9c2248ac4996ad1fd1fe9f492eb2d71b758cb) 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: cae6106f152c8c44e2d85179ad7e6831b974ffd5) 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: 13d844b15deba49a54676fa6f83ab4526ec74b9a) 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: 8e6210530042b722a4f7fea17e5d10cddcd8dfab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5b2c70fab2ffa409b861d83f048b65d458d03a90) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/runtime_test/virgl: Disable for all fedoraSteve Sakoman2024-10-121-1/+1
| | | | | | | | | We can't support vgem on RHEL derived distros so disable this test for all fedora hosts rather than specific versions. (From OE-Core rev: c4760d6a52011515b0f931d08f619c7e49e72158) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* lib/oeqa: rename assertRaisesRegexp to assertRaisesRegexRoss Burton2024-09-271-2/+2
| | | | | | | | | | | | TestCase.assertRaisesRegexp was renamed to assertRaisesRegex in Python 3.2, so rename to fix a warning during test execution. (From OE-Core rev: ff720f337e40761c7d4d544c963cf518ad5403ad) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6df44a4b29487bf8ef51bb5ba6467a4056b749cc) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest: skip virgl gtk/sdl test on ubuntu 18.04Steve Sakoman2024-03-121-0/+2
| | | | | | (From OE-Core rev: 20c70400ea7739a20bec174ac5df6841cbf0b4de) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* meta/lib/oeqa: python 3.12 regexAdrian Freihofer2024-03-013-5/+5
| | | | | | | | | | | | | | | | | Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. (From OE-Core rev: 939046c5e9ddd71b941c9e389fa4a4687bfcdec0) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from master: 9002850f0c2e409d3bc629e36bb360b96326bb64 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/oelib/buildhistory: git default branchAdrian Freihofer2024-03-011-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | On hosts with git defaulting to main branch the following exception occures: File .../buildhistory.py", line 99, in test_compare_dict_blobs_default blob1 = self.repo.heads.master.commit.tree.blobs[0] ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/git/util.py", line 1114, in __getattr__ return list.__getattribute__(self, attr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'IterableList' object has no attribute 'master' Support main and master branch for these test cases. Note: setting the default branch with --initial-branch requires git version 2.28 or later. Some of the still supported host distros do not provide this feature yet. (From OE-Core rev: 095598eb7c9aa64797c8a41255fa28b695398054) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from master: 7df99843d8f31d8e0c2872ff625f4a5abf28f740 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/recipetool: expect meson.bbAdrian Freihofer2024-03-011-2/+2
| | | | | | | | | | | Latest recipetool from master branch generates a pyhton3-meson.bb recipe while the older version from kirkstone generates a meson.bb. Change the test to pass with meson.bb. (From OE-Core rev: 979b216330b2f4e8ab9d4e615d4e83997d59def0) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/recipetool: downgrade meson version to not use pyproject.tomlRoss Burton2024-03-011-13/+16
| | | | | | | | | | | | | | | | | | | recipetool's pyproject.toml parsing needs tomllib (python 3.11+) or tomli (not a hard dependency), so is prone to failing depending on the host configuration. Downgrade the Meson release used for the checks to 0.52.1, which was the last release before moving to pyproject.toml. (From OE-Core rev: 24bf7bbd1fb21f84539b7a4263d76a33dbacacde) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 6dfe573d83687e5431841f062442b54b9fa22ff3 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/recipetool: fix for python 3.12Adrian Freihofer2024-03-011-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | test_recipetool_create_github and test_recipetool_create_github_tarball fail because the old meson version used by these tests cases does not run on Python 3.12. The issue is in the dependencies.py which comes with meson: ERROR: build/tmp/work/recipetool-3z4osyl7/source/git/mesonbuild/ dependencies.py:777: SyntaxWarning: invalid escape sequence '\.' Use meson 1.3.1 (what is currently also used on master) as a reference for these tests. With this version of meson, recipetool creates recipes named meson_git.bb or meson_1.3.1.bb. Since this looks more reasonable than e.g. python3-meson_git.bb the test gets adapted. (From OE-Core rev: 9c1a1110a317e1d64668badb13e74e474f96a7a9) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 7374a8a2810a6cf027bfefefe87691a3529123ff Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa: replace deprecated assertEqualsAdrian Freihofer2024-03-013-3/+3
| | | | | | | | | | | | | | | | assertEquals is deprecated since Python 2.7: https://docs.python.org/2/library/unittest.html#deprecated-aliases It throws errors at least on Python 3.12. Replace it by assertEqual. (From OE-Core rev: a20325690a057aa7f71e5a176bfbdc03baac405c) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 68286d0b70cf09a0d2950b48945c9192fb8c8769 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/runtime_test: only run the virgl tests on qemux86-64Ross Burton2024-02-281-1/+4
| | | | | | | | | | | | These tests should be able to work on qemuarm64, but this is untested and the runners will need configuration. (From OE-Core rev: 16a9037d28303af250bd379de53edb7a00a8ce49) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 09b9558e20e58b473154895b93cff16261c7f561) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* Revert "oeqa/utils/gitarchive: fix tag computation when creating archive"Steve Sakoman2023-09-241-4/+2
| | | | | | | | | | This reverts commit d0f8d5915a9ad3340a553b4a22f91074d7e679c9. This is causing errors with buildperf on the autobuilder. (From OE-Core rev: 87eee047cf77bc3fc2c7d6b2a4f35d2642919111) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/utils/gitarchive: fix tag computation when creating archiveAlexis Lothoré2023-09-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sporadic errors have been observed in autobuilder when trying to store new tests results: error: failed to push some refs to 'push.yoctoproject.org:yocto-testresults' hint: Updates were rejected because the tag already exists in the remote. The new tag name is generated by gitarchive based on known tags from the repository (learnt with git tag). In autobuilder case, this repository is a shallow clone, so git tag only returns most recent tags, which mean we could miss some older tags which exist in remote but not locally. In this case, gitarchive will likely create a tag which already exists in remote, and so will fail to push Fix this tag duplication by using git ls-remote to learn about existing tags instead of git tag. Two places which wrongly read only local tags has been identified in gitarchive: expand_tag_strings and get_test_runs Fixes [YOCTO #15140] (From OE-Core rev: d0f8d5915a9ad3340a553b4a22f91074d7e679c9) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5a0a7da85a3acfd4a20a07478eabefdab60f313a) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/ssh: Further improve process exit handlingRichard Purdie2023-08-261-2/+3
| | | | | | | | | | | | | | | | It looks like there were further cases where orphaned processes may be left behind since the .kill() calls may be unsuccessful if the process terminated due to the terminate or through normal exit. In that situation .wait() wouldn't have been called. Further tweak the exit code paths to ensure .wait() is called to update the returncode value before returning in all cases. (From OE-Core rev: e1e038ab01a599fcdd4aa6211b6d15cd01a5e2e3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0a0a1731e38edfa72a141e8fd8f2de52be562e94) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* target/ssh: Ensure exit code set for commandsRichard Purdie2023-08-261-0/+3
| | | | | | | | | | | | | | As spotted by Joshua Watt, the returncode isn't set until .poll() or .wait() is called so we need to call this after the .kill() call. This fixes return code reporting so that timeouts for example now return an exit code when they didn't before. (From OE-Core rev: c70b05ea667e7bd280470b0b6ca10efb0f648e0f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3924e94214b5135369be2551d54fb92097d35e95) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime/ltp: Increase ltp test output timeoutRichard Purdie2023-08-261-1/+1
| | | | | | | | | | | | On our slower arm server, the tests currently timeout leading to inconsistent test results. Increase the timeout to avoid this and aim to make the test results consistent. (From OE-Core rev: b161af52b9454e07435dc9737b0a2522295f3e4d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9a8b49208f3c99e184eab426360b137bc773aa31) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/target/ssh: Ensure EAGAIN doesn't truncate outputRichard Purdie2023-08-261-0/+3
| | | | | | | | | | | | We have a suspicion that the read() call may return EAGAIN on the non-blocking fd and this may truncate test output leading to some of our intermittent failures. Tweak the code to avoid this potential issue. (From OE-Core rev: 4c02f7407d7afaefe1bc72aea25087b3f2271ac2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a8920c105725431e989cceb616bd04eaa52127ec) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/cases/glibc.py: switch to using NFS over TCPAnuj Mittal2023-08-261-2/+2
| | | | | | | | | | | | | This provides a more reliable test execution when running tests that write a large buffer/file and significantly reduces the localedata test failures. (From OE-Core rev: 8d0c669d3d04cf5bc645978afb22ba6c3f3d53e6) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 97a7612e3959bc9c75116a4e696f47cc31aea75d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/utils/nfs: allow requesting non-udp portsAnuj Mittal2023-08-261-2/+2
| | | | | | | | | | | Allows setting up NFS over TCP as well. (From OE-Core rev: 2727a0cb8d026e0c47aedd91f7c02e24b056f37b) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e1ff9b9a3b7f7924aea67d2024581bea2e916036) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/cases/glibc.py: increase the memory for testingAnuj Mittal2023-08-261-1/+1
| | | | | | | | | | | | Some of the tests trigger OOM and fail. Increase the amount of memory available so we dont run into these issues. (From OE-Core rev: 060030ac9d00bf22ae3a2695d7ea060f0f69dfa8) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4d22dba482cb19ffcff5abee73f24526ea9d1c2a) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/cases/glibc.py: fix the override syntaxAnuj Mittal2023-08-261-1/+1
| | | | | | | | | | | Fix the override so we actually pass the correct value to glibc. (From OE-Core rev: 60ca407ce3113d8b507aaa0876b28902aab7ed5b) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 38fd2120f0f48512091ddad6205ce19839eaf589) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/devtool: add unit test for "devtool add -b"Yoann Congal2023-08-021-0/+32
| | | | | | | | | | | | Fix [Yocto #15085] Co-authored-by: Fawzi KHABER <fawzi.khaber@smile.fr> (From OE-Core rev: ea1592b49c6b45495fe9243339fc4dc9cea9ef12) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d5eedf8ca689ccb433c2f5d0b324378f966dd627) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/runtime/cases/rpm: fix wait_for_no_process_for_user failure caseRoss Burton2023-08-021-2/+2
| | | | | | | | | | | | | | str.format() doesn't use % notation, update the formatting to work. assertTrue() is a member of self not a global, and assertTrue(True) will always pass. Change this to just self.fail() as this is the failure case. (From OE-Core rev: 05c8af81438d43fd83495cb165c75f43778fea41) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 017f3a0b1265c1a3b69c20bdb56bbf446111977e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/reproducible: Allow chose the package managerJose Quaresma2023-07-211-1/+5
| | | | | | | | | | | | This is a follow-up of 76e5fcb2 that also allow users to chose the package manager using OEQA_REPRODUCIBLE_TEST_PACKAGE (From OE-Core rev: 4402b746f49611abe71719dd1d174de79bb030bb) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3d414d85b44077bac57aba36707b0fc699a73e97) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest reproducible.py: support different build targetsMikko Rapeli2023-07-211-2/+6
| | | | | | | | | | | | | | | | | | Allow users to set different build reproducibility targets than the defaults using OEQA_REPRODUCIBLE_TEST_TARGET and OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS variables in local.conf. Fixing all issues from "world" builds is not possible in some complex build environments with lots of layers. Limiting the focus to a smaller subset allows using this test to detect and fix build reproduction issues incrementally. (From OE-Core rev: 3b82a7d74995c0670a6914c58b3d7c42327b8ee9) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit c66bebbce5995e386a1a4d055a914a39b6ee518d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/bbtests: add non-existent prefile/postfile testsFabien Mahot2023-07-121-0/+8
| | | | | | | | | | | | Fixes [YOCTO #10725] (From OE-Core rev: ef732d6dd735ad06c229eb4e2a4aca295490ec53) Signed-off-by: Fabien Mahot <fabien.mahot@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b0c33655fad5b2e7d96a45b6210527dfb766797b) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/cases/devtool.py: skip all tests require folder a git repoThomas Roos2023-06-231-0/+8
| | | | | | | | | | | | | | | Devtool selftests require poky dir a git repo, when downloading poky as a tar, this is not the case. Those tests will now skipped. [YOCTO #12389] (From OE-Core rev: 9ce30faa488ea905292b9944fb3c1b471019f28c) Signed-off-by: Thomas Roos <throos@amazon.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 95a5bc130dc51ea9de95c64dbf0e9c7892415d50) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest/reproducible: Allow native/cross reuse in testRichard Purdie2023-06-141-2/+2
| | | | | | | | | | | | | | We don't compare reproducibility of the native/cross components, only the target ones. With the long build times of rust-native, the test now takes crazy lengths of time so this tweak should allow us to reuse native/cross artefacts from sstate whilst still testing the target output is reproducible. (From OE-Core rev: 18a9596ae711ba37ac7e44e46744298ba79ae320) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b494d83c639a877cefeb7cbab6d37195e492f059) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/utils/metadata.py: Fix running oe-selftest running with no distro setThomas Roos2023-05-121-3/+3
| | | | | | | | | | | | | This will use default values when no distribution is set. [YOCTO #15086] (From OE-Core rev: 01eb8d4ad71c587d56608d83ec4187375b2f4c44) Signed-off-by: Thomas Roos <throos@amazon.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 888fe63b46efceeff08dbe8c4f66fec33d06cb7a) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* selftest: devtool: set BB_HASHSERVE_UPSTREAM when setting SSTATE_MIRRORMartin Jansa2023-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * with my build/conf/local.conf: SSTATE_DIR = "/OE/build/poky/build/sstate-cache" these devtool tests will first set own SSTATE_DIR and the original one set as SSTATE_MIRROR: 2023-03-11 11:51:46,837 - oe-selftest - INFO - test_devtool_update_recipe_append (devtool.DevtoolUpdateTests.test_devtool_update_recipe_append) 2023-03-11 11:51:46,846 - oe-selftest - DEBUG - Appending to: /OE/build/poky/build/build-st-2023-03-11-patch2/devtool.DevtoolUpdateTests.test_devtool_update_recipe_append/build-st/conf/selftest.inc SSTATE_DIR = "/OE/build/poky/build/build-st-2023-03-11-patch2/devtool.DevtoolUpdateTests.test_devtool_update_recipe_append/build-st/sstate_devtool" SSTATE_MIRRORS += "file://.* file:////OE/build/poky/build/sstate-cache/PATH" * but that unfortunately leads to a warning from sanity.bbclass about SSTATE_MIRRORS without matching BB_HASHSERVE, because BB_HASHSERVE is set to "auto" by default these tests failing with: 2023-03-11 11:55:39,610 - oe-selftest - INFO - ====================================================================== 2023-03-11 11:55:39,610 - oe-selftest - INFO - FAIL: test_devtool_update_recipe_append_git (devtool.DevtoolUpdateTests.test_devtool_update_recipe_append_git) 2023-03-11 11:55:39,610 - oe-selftest - INFO - ---------------------------------------------------------------------- 2023-03-11 11:55:39,611 - oe-selftest - INFO - Traceback (most recent call last): File "/OE/build/poky/meta/lib/oeqa/selftest/cases/devtool.py", line 1118, in test_devtool_update_recipe_append_git self.assertNotIn('WARNING:', result.output) AssertionError: 'WARNING:' unexpectedly found in 'NOTE: Starting bitbake server...\nWARNING: You are using a local hash equivalence server but have configured an sstate mirror. This will likely mean no sstate will match from the mirror. You may wish to disable the hash equivalence use (BB_HASHSERVE), or use a hash equivalence server alongside the sstate mirror.\nLoading cache...done.\nLoaded 0 entries from dependency cache.\nParsing recipes...done.\nParsing of 947 .bb files complete (0 cached, 947 parsed). 1764 targets, 52 skipped, 0 masked, 0 errors.\n\nSummary: There was 1 WARNING message.\nINFO: Updating SRCREV in recipe mtd-utils-selftest_git.bb\nNOTE: Writing append file /tmp/devtoolqa1m2lh02v/layer/recipes-devtools/mtd/mtd-utils-selftest_git.bbappend' ---------------------------------------------------------------------- * just setting BB_HASHSERVE to empty doesn't work, because then we would need to disable OEEquivHash as well as it fails with: ERROR: OEEquivHash requires BB_HASHSERVE to be set (From OE-Core rev: e634a87d2f4f1e57d28c4e7462d56515ed2ea9ef) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 96d4392ee9c5c3674e5c4c4512f527a2ca6765e4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Fix false negative version issueGeoffrey GIRY2023-04-111-0/+19
| | | | | | | | | | | | | | | | | NVD DB store version and update in the same value, separated by '_'. The proposed patch check if the version from NVD DB contains a "_", ie 9.2.0_p1 is convert to 9.2.0p1 before version comparison. [YOCTO #14127] Reviewed-by: Yoann CONGAL <yoann.congal@smile.fr> (From OE-Core rev: f331c80df6c447d3073ebe3f00102c78ced242f3) Signed-off-by: Geoffrey GIRY <geoffrey.giry@smile.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 7d00f6ec578084a0a0e5caf36241d53036d996c4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa rtc.py: skip if read-only-rootfsMikko Rapeli2023-03-281-3/+5
| | | | | | | | | | | | | | hwclock command fails on read-only-rootfs: AssertionError: 1 != 0 : Failed to reset RTC time, output: hwclock: cannot open /etc/adjtime: Read-only file system (From OE-Core rev: b89abb0f4cc28c45a62c524a3e2f96795235e214) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 017bf8c160f6ab67d9f8e8d9e30b15bf84f73807) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/recipetool: Stop test corrupting tinfoil classRichard Purdie2023-03-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Running recipetool.RecipetoolTests.test_recipetool_handle_license_vars followed by wic.Wic2.test_biosplusefi_plugin_qemu would show a failure of: File "/media/build/poky/meta/lib/oeqa/utils/commands.py", line 351, in runqemu qemu = oeqa.targetcontrol.QemuTarget(recipedata, targetlogger, image_fstype) File "/media/build/poky/meta/lib/oeqa/targetcontrol.py", line 116, in __init__ use_kvm = oe.types.qemu_use_kvm(d.getVar('QEMU_USE_KVM'), d.getVar('TARGET_ARCH')) File "/media/build/poky/meta/lib/oe/types.py", line 182, in qemu_use_kvm if kvm and boolean(kvm): File "/media/build/poky/meta/lib/oe/types.py", line 128, in boolean raise ValueError("Invalid boolean value '%s'" % value) ValueError: Invalid boolean value '/media/build/poky/meta/files/common-licenses' which made no sense until you realise the recipetool test is corrupting the tinfoil class. Work on a copy instead to avoid this. (From OE-Core rev: af73a79f6d4e18e8cc81da19882b7125b92d2523) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7fe76fe17f67c1bbd108d02836692fed20d24771) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/runtime_test/virgl: Disable for all Rocky LinuxMichael Halstead2023-03-231-1/+2
| | | | | | | | | | | | | RHEL compatible kernels do not support vgem so we disable virgl headless testing. (From OE-Core rev: 0f317a0533f20580e77a0d6d0b636c05b3230b1e) Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 78bc1ba2361249ec845d1b9e28d429a37dd83910) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: Improve Meson testTom Hochstein2023-03-201-1/+1
| | | | | | | | | | | | | | | | | The meson wrapper setup command detection is broken in the case of an implicit setup command with an option with a space-separated argument, but the test was not detecting it since the case was not covered. Add the option `--warnlevel 1` to the meson command line to cover this case. (From OE-Core rev: 3fbcaaa01304bbc645ddf01ef91805811e3c7f54) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 54e9ee8a0c6c9fc89cbb743f0e4fc18607d503cf) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/prservice: Improve debug output for failureRichard Purdie2023-03-201-1/+1
| | | | | | | | | | | | | We keep seeing this failure on the autobuilder but the output amounts to "False is not True". Improve the debug message on the chance it may make the issue clearer. (From OE-Core rev: 9afb0e2f781720715fc6fd8595d6996465589892) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d03f4cf19c2cc96e9d942252a451521dfec42ebc) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa ssh.py: fix hangs in run()Mikko Rapeli2023-03-091-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When qemu machine hangs, the ssh commands done by tests are not timing out. do_testimage() task has last logs like this: DEBUG: time: 1673531086.3155053, endtime: 1673531686.315502 The test process is stuck for hours, or for ever if the executing command or test case did not set a timeout correctly. The default 300 second timeout is not working when target hangs. Note that timeout is really a "inactive timeout" since data returned by the process will reset the timeout. Make the process stdout non-blocking so read() will always return right away using os.set_blocking() available in python 3.5 and later. Then change from python codec reader to plain read() and make the ssh subprocess stdout non-blocking. Even with select() making sure the file had input to be read, the codec reader was trying to find more stuff and blocking for ever when process hangs. While at it, add a small timeout to read data in larger chunks if possible. This avoids reading data one or few characters at a time and makes the debug logs more readable. close() the stdout file in all cases after read loop is complete. Then make sure to wait or kill the ssh subprocess in all cases. Just reading the output stream and receiving EOF there does not mean that the process exited, and wait() needs a timeout if the process is hanging. In the end kill the process and return the return value and captured output utf-8 encoded, just like before these changes. This fixes ssh run() related deadlocks when a qemu target hangs completely. (From OE-Core rev: 04f080802b4a28709a105e4f0ead56a7a2da42b4) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 9c63970fce3a3d6029745252a6ec2bf9b9da862d) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/resulttooltests: fix minor typoAlexis Lothoré2023-03-091-1/+1
| | | | | | | | | | (From OE-Core rev: 2da6b6f231519b32fde61a64559aa105f2a9342f) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 80cfa56d133bd3abbb1f37272607d8e15ce70861) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/bbtests: Update message lookup for test_git_unpack_nonetwork_failAlexandre Belloni2023-02-241-1/+1
| | | | | | | | | | | | bitbake's output changed, update the test (From OE-Core rev: 6b50713cd51002584915f46eb366b8667db210ea) Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7e64b63f96dd1d71e263e7bbbe6591e51e98395a) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa qemurunner.py: try to avoid reading one character at a timeMikko Rapeli2023-02-241-0/+2
| | | | | | | | | | | | | | Read from serial console with a small delay to bundle data to e.g. full lines. Reading one character at a time is not needed and causes busy looping. (From OE-Core rev: e91a09702680b713293bcfcc851b27a73e884a8b) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 0049f6757f6f956fb4cc77b3df6a672c20b53cf4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa qemurunner.py: add timeout to QMP callsMikko Rapeli2023-02-241-0/+3
| | | | | | | | | | | | | | | | | | When a qemu machine hangs, the QMP calls can hang for ever too, and when this happens any failing test commands from ssh runner may be followed by dump_monitor() calls which then also hang. Hangs followed by hangs. Use runqemutime at setup and run_monitor() specific timeout for later calls. (From OE-Core rev: 3b99d0ce6445084038f89dfa98605a7aec49107b) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 3a07bdf77dc6ecbf4c620b051dd032abaaf1e4ff) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa qemurunner: read more data at a time from serialMikko Rapeli2023-02-241-1/+3
| | | | | | | | | | | | | | Use a short sleep to bundle serial console reads so that we are not reading one character at a time which reduces busy looping. (From OE-Core rev: 3699e5bf2f9259266c49aaf69127183988b9d052) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit cafe65d8cf7544edbd387f7f5f6d77c64c6b18fa) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa dump.py: add error counter and stop after 5 failuresMikko Rapeli2023-02-241-2/+21
| | | | | | | | | | | | | | | | | | | | | | If test target qemu machine hangs completely, dump_target() calls over serial console are taking a long time to time out, possibly for every failing ssh command execution and a lot of test cases, and same with dump_monitor(). Instead of trying for ever, count errors and after 5 stop trying to dump_target() and dump_monitor() completely. These help to end testing earlier when a test target is completely deadlocked and all ssh, serial and QMP communication with it are failing. (From OE-Core rev: 91bc1e03bc990c527d8aadbdcd7bf97217db124e) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit d9ad0a055abba983c6cee1dca4d2f0a8a3c48782) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa ssh.py: add connection keep alive options to ssh clientMikko Rapeli2023-02-241-0/+2
| | | | | | | | | | | | | | | | | | | | Configure ssh client to test that connection with server is up. If the server does not respond within a minute then the connection, target machine or sshd daemon are stuck and it's better to exit the command execution with errors. Some tests can execute a long time without returning stdout/stderror data and it's difficult to adjust timers for those cases if connection to target machine or the target machine itself hangs and output is not expected in minutes or even hours. (From OE-Core rev: 94021c8571242dd491ee3c7c40144c5a12ca8e42) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit ba68ff04c5786eca7cd8dd44056705867dea8ac4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa ssh.py: move output prints to new lineMikko Rapeli2023-02-241-3/+3
| | | | | | | | | | | | | The output from is garbled otherwise and it's not easy to remove debug output form real command output on target. (From OE-Core rev: 36b572fbc5c88b9aaf4e146ecdb00c8d4ea6ff70) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 917a70cbc43ac1c70c477b220c4115735457ef04) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa context.py: fix --target-ip comment to include ssh port numberMikko Rapeli2023-02-151-2/+2
| | | | | | | | | | | | | Providing ssh port number is supported too with "--target-ip 192.168.0.10:22". (From OE-Core rev: 54c30e509074073b99a7a8890482ba1af2abbab9) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 637919b9df0abc06da5b2f9b389cf25376bd6b7c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>