Commit Graph

3685 Commits

Author SHA1 Message Date
Jonathan GUILLOT
c2a7c008e1 lib/oe/package: add LOCALE_PATHS to add define all locations for locales
Some packages may contain localized files not located in default path
${datadir}/locale. Add the new variable LOCALE_PATHS to allow a recipe
to define extra paths or even fully override the scanned directories.
LOCALE_PATHS is set at ${datadir}/locale by default to keep the exact
same behavior for the recipes which did not need modification.

(From OE-Core rev: 0ffc7cf01225743789ac30dd325fca05b9203be1)

Signed-off-by: Jonathan GUILLOT <jonathan@joggee.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-14 13:53:36 +00:00
Jonathan GUILLOT
c381ca7243 lib/oe/package: replace in place PN-locale-* packages in PACKAGES
split_locales() removes PN-locale from PACKAGES and adds PN-locale-* to the end.
As the PN-locale package typically appears before PN base package, it may result
in paths not installed in PN-locale-* packages if already catched by PN. Now
insert PN-locale-* exactly where PN-locale was existing in list to avoid such
an issue.

(From OE-Core rev: 108bc167ed0d43505af3140947a0ab79c89f0a7b)

Signed-off-by: Jonathan GUILLOT <jonathan@joggee.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-14 13:53:36 +00:00
Philip Lorenz
87798f82db ipk: Remove temporary package lists during SDK creation
The temporary package lists used during SDK creation should not be
shipped as part of the SDK (in particular because due to the opkg local
file download optimization they are actually symlinks into the build
directory). Remove them by calling the respective helper method during
the SDK build.

(From OE-Core rev: c18ba66da3c77f247170efd2cb350686010bef57)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-13 13:51:41 +00:00
Adrian Freihofer
fe58da1393 meta/lib/patchtest: python 3.12 regex
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: 329a555f7b8f00c648c44b01f423e6da33a46245)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-13 13:51:41 +00:00
Adrian Freihofer
7f2755daca meta/lib/oeqa: python 3.12 regex
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: 9002850f0c2e409d3bc629e36bb360b96326bb64)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-13 13:51:41 +00:00
Adrian Freihofer
97eebe59d7 oeqa/selftest/oelib/buildhistory: git default branch
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: 7df99843d8f31d8e0c2872ff625f4a5abf28f740)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-13 13:51:41 +00:00
Ross Burton
398f27cc0b oeqa/selftest/recipetool: downgrade meson version to not use pyproject.toml
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: 6dfe573d83687e5431841f062442b54b9fa22ff3)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-10 14:13:23 +00:00
Michael Opdenacker
6a9aab5654 oeqa/runtime/cases: fix typo in information message
(From OE-Core rev: 901ff496b97119add792912fbb2f1efb1152e7c2)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-09 15:55:58 +00:00
Richard Purdie
fcabbccd5f selftest/recipetool: Improve test failure output
When the test fails, it simply says the file doesn't exist. This isn't helpful
so improve the output.

(From OE-Core rev: ea6b42485696c6981157a28da2dc9a67f2f3f9c6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-09 13:55:06 +00:00
Richard Purdie
f9ed2bdfdb selftest/recipetool: Factor tomllib test to a function
As more tests start to need this codeblock, factor it into a common function.

(From OE-Core rev: c154eba9aa8e7d780ce2c5a18cbc0756a30850d1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-09 13:55:06 +00:00
Adrian Freihofer
5206056589 oeqa/selftest/recipetool: fix for python 3.12
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: 7374a8a2810a6cf027bfefefe87691a3529123ff)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08 23:14:51 +00:00
Adrian Freihofer
f58aedff02 oeqa: replace deprecated assertEquals
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: 68286d0b70cf09a0d2950b48945c9192fb8c8769)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08 23:14:51 +00:00
Ross Burton
6f2c3b7744 lib/oeqa: rename assertRaisesRegexp to assertRaisesRegex
TestCase.assertRaisesRegexp was renamed to assertRaisesRegex in Python
3.2, so rename to fix a warning during test execution.

(From OE-Core rev: 6df44a4b29487bf8ef51bb5ba6467a4056b749cc)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08 23:14:51 +00:00
Alexander Kanavin
a380d6d137 selftest/SStateCacheManagement: pre-populate the cache
This is another source of the test slowness: for some configurations
(building x86 on x86) the cache items are pre-populated in other
builds. For others (building 32 bit x86 on arm), they're not. Without
this step, the test would build them, write them to a private
sstate, and then throw it away.

The code is un-pythonic: it follows the style of the rest of the test,
and fixing that is perhaps for some other time.

With these two changes the notoriously slow test_sstate_cache_management_script_using_machine
takes just under 6 minutes, on an arm worker:

https://autobuilder.yoctoproject.org/typhoon/#/builders/127/builds/2820/steps/13/logs/stdio

(From OE-Core rev: b685c955289bf4d7d70bd0f4c1530b2bf13a30a6)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08 17:12:54 +00:00
Alexander Kanavin
5ae7c6268b selftest/SStateCacheManagement: do not manipulate ERROR_QA
This is no longer necessary as selftest enforces buildhistory disabling nowadays.

It is also a significant contributor to slowness of the tests:
they work by setting up private sstate and retaining autobuilder sstate
as a read-only mirror, and if the needed objects aren't in that
mirror (as particularly seen on arm hosts), then the whole build
stars from scratch - and then is thrown away.

(From OE-Core rev: 208c8bc0e168cd2fd5884882b892862c6303fdfe)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08 17:12:54 +00:00
Khem Raj
bd7a3fd0f7 buildcpio.py: Switch to using cpio-2.15
This helps in getting it building with newer architectures like riscv32
since it has upgraded gnulib over 2.14 which has the needed fixes.

Drop the -fno-common workaround as it is already applied to cpio

drop --disable-maintainer-mode

Fixes
configure: WARNING: unrecognized options: --disable-maintainer-mode

(From OE-Core rev: 18d303497089d3a7a893ee0eec5b0f0c78cca06d)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08 10:59:06 +00:00
Martin Jansa
77f5f99fcf package_manager: ipk: add OPKG_MAKE_INDEX_EXTRA_PARAMS variable
* can be used to pass e.g. -f param to preserve user-defined fields
  in the index as added in:
  https://git.yoctoproject.org/opkg-utils/commit/opkg-make-index?id=13f6281d24e17199e0fef6c2984419372ea0f86f

* otherwise it will show a lot of messages like:
  "Lost field Author <value>"
  for every package in the feed

(From OE-Core rev: 6dc772fd9d5c2d90a6e32cfa4bc46ca0221f1b7f)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08 10:53:13 +00:00
Richard Purdie
0513fd279c ltp: Enable extra test groups
Petr Vorel (upstream ltp maintainer) recommended some extra tests we should run.
Enable these for extra test coverage.

(From OE-Core rev: ebae56999dc2ed7abb65062a9abee53827c3bad3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-06 10:32:19 +00:00
Petr Vorel
b6abbf4402 ltp: Update to 20240129
Removed patch accepted upstream as
8c53cc947 ("testcases/kernel/syscalls/fcntl: define _LARGEFILE64_SOURCE")

Rebase runtest/mm patch.

[RP:
Drop connectors group since dropped upstream:
9b642d89c0

Drop fsx too:
fb2b6a0b3c
]

(From OE-Core rev: b2867cac5ac58862469f0c6c056607abeca0b0d0)

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-05 14:06:10 +00:00
Richard Purdie
0a9e45a413 oeqa/selftest/bbtests: Tweak to use no-gplv3 inc file
With changes to gcc-runtime around improving debugging, python modules
are needed but this pulls in bash which breaks the tests.

Add an exclusion to the no-gplv3 include file to handle this.

(From OE-Core rev: 803060fa4e8fe98ac8f987b80162110d06788946)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-05 14:06:10 +00:00
Richard Purdie
34c747f017 conf: Move selftest config to dedicated inc file
Create a no-gplv3.inc file based upon knowledge currently encoded into one
of the selftests.

There is a risk that people try and take this idea too far, or have unrealistic
expectations. That said, it would be better to collect this knowledge together
in one location rather than handling it piecemeal.

Therefore move the configuration information from the test into a common
incude file.

(From OE-Core rev: fb822fb2029c69934cf43073f95b396c2d60298e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-05 14:06:10 +00:00
Khem Raj
34abe0219f sdk/assimp.py: Fix build on 32bit arches with 64bit time_t
This testcase does not work properly with 32bit systems as it houses an
older version of zlib which needs to be patched to work with 32bit
systems with 64bit time_t e.g. mips o32.

Apply a needed patch via sed logic to fix this issue.

Enable bundled zlib in build, which means we do not require zlib to be
available in SDK and it can be built for more variety of images.

Upgrade the testcase to use 5.3.1 release of assimp and add cmake option to
enable bundled zlib explicitly.

(From OE-Core rev: 3c922fb61aa4f3bbb5c4ef35639acdf263c4313c)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-05 14:06:09 +00:00
Alexander Kanavin
1bd73eddb5 setftest/cdn tests: check for exceptions also in fetcher diagnostics
Otherwise the output was cluttered with irrelevant lines that were
describing missing, but excepted cache objects.

(From OE-Core rev: 146e6e88b6c9400eb2c7442a319a6240b00ecaa2)

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>
2024-02-02 11:06:17 +00:00
Richard Purdie
5573fb12eb oeqa/qemurunner: Handle rare shutdown race
The pid file can disappear when qemu is shutting down leading to a
file not found race before it is read.

Tweak the code to handle this and fix a rare but annoying race error
case.

[YOCTO #15036]

(From OE-Core rev: 8c07aac9d55f92fe5fbe3cab9f006efecf266328)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-30 15:15:54 +00:00
Alexander Kanavin
482ed7cd80 oeqa/runtime/rpm: fail tests if test rpm file cannot be found
Discovery of the test file was happening in a class initializer.
That block of code cannot fail (it's not a test), and so it
falls through to completion even if the needed file could not be found.

Then the tests themselves fail later due to class variables not
being set, but all information as to why is already lost at that point.

This converts the discovery to a helper function called from
the tests, so that the function can fail the tests precisely when the
problems occur.

(From OE-Core rev: 5d7a6ede105ea1efc9c324c7029f9d08dadf7255)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:02 +00:00
Chen Qi
5ae14523a7 oeqa/selftest: add test case to cover 'devtool modify -n' for a git recipe
Add a test case to ensure the following error does not happen again for
'devtool modify -n'.

Traceback (most recent call last):
  File "/buildarea2/chenqi/poky/scripts/devtool", line 349, in <module>
    ret = main()
  File "/buildarea2/chenqi/poky/scripts/devtool", line 336, in main
    ret = args.func(args, config, basepath, workspace)
  File "/buildarea2/chenqi/poky/scripts/lib/devtool/standard.py", line 924, in modify
    if not initial_revs["."]:
KeyError: '.'

(From OE-Core rev: 2c2ba5f9497462a190b849a69d8440149f80582a)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 16:06:29 +00:00
Yash Shinde
bb630c3e29 rust: Enable rust oe-selftest.
* Enable rust oe-selftest.

* Include the dependent patches for rust oe-selftest in
  meta/recipes-devtools/rust/rust-source.inc

* Disable rust oe-selftest for mips32 target (Rust upstream has classified it into tier 3 target,
  for which the Rust project does not build or test automatically) as it is unstable with rust tests.
  https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3

* The testing is done on arm32, arm64, mips64, x86 and  x86_64 targets on Ubuntu 22.04.

(From OE-Core rev: 8f3a2841540fc4779bbd7e11d910edcdc8b47683)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:06:55 +00:00
Yash Shinde
a6982bb6a4 rust: Remove the test cases whose parent dir is also present in the exclude list
To avoid overlap and redundancy of rust tests, remove the test cases whose
parent dir is already excluded.

Tests which are failing from below dirs are removed as these dirs are
already present in exclude list
            tests/run-make
            tests/rustdoc
            tests/mir-opt
            tests/ui-fulldeps

(From OE-Core rev: 58a7f3efa9e31e2c7b90e6490f3e51f388e6a7ce)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:06:55 +00:00
Yash Shinde
30872876dc rust: Add new tests in the exclude list for rust oe-selftest
Add newly failing tests cases in the exclude list for
rust oe-selftest.

(From OE-Core rev: 50119ddaaa810ad71063691fb1cc30cf8c8456c8)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:06:55 +00:00
Julien Stephan
bf9ac22f41 oeqa/selftest/devtool: add test for recipes with multiple sources in SRC_URI
add a non regression test for devtool modify/build on recipe having
several sources in SRC_URI

(From OE-Core rev: 5f195f5e98d5553e41e632eda26392ee70394c88)

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-24 15:46:19 +00:00
Ross Burton
bfaea5f7ec cve_check: cleanup logging
Primarily list the number of patches found, useful when debugging.

Also clean up some bad escaping that caused warnings and use
re.IGNORECASE instead of manually doing case-insenstive rang matches.

(From OE-Core rev: 10acc75b7f3387b968bacd51aade6a8dc11a463f)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-23 11:53:41 +00:00
Ross Burton
ab375ea3fe cve_check: handle CVE_STATUS being set to the empty string
Handle CVE_STATUS[...] being set to an empty string just as if it was
not set at all.

This is needed for evaluated CVE_STATUS values to work, i.e. when
setting not-applicable-config if a PACKAGECONFIG is disabled.

(From OE-Core rev: 2c9f20f746251505d9d09262600199ffa87731a2)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-23 11:53:41 +00:00
Richard Purdie
2ebe7f60fd reproducible: Fix race with externalsrc/devtool over lockfile
We occasionally see races over the lockfile used by externalsrc/devtool
when walking files for the source_date_epock calculation. Skip this file
if present to avoid the issues and fix a real issue where SDE could be
contaminated too.

[YOCTO #14921]

(From OE-Core rev: 4bc0eb4bd90e6e6e46581a8ed367212bdd910a26)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-19 12:21:22 +00:00
Vyacheslav Yurkov
58722df9e1 oeqa/selftest/recipetool: Add test coverage for local go modules
(From OE-Core rev: 2d0ccfdca0a6cc1146464585f529fb5115a0b3ea)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-19 12:21:22 +00:00
Vyacheslav Yurkov
a075bf502e oeqa/selftest/recipetool: Move helper function to the class scope
(From OE-Core rev: 89d37266524ca3e7c9eaf9141b30055ebc39aa76)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-19 12:21:22 +00:00
Vyacheslav Yurkov
b6766e0ac2 oeqa/selftest/recipetool: Move create_go test to a proper class
(From OE-Core rev: 862b4d2211f2fc81a17def79f06d9672fa5df960)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-19 12:21:22 +00:00
Richard Purdie
bc883e4991 rootfs-postcommands: Try and improve ordering constraints
The current code is in race to see who can set things last. This isn't scalable or
sustainable and problemtic in the face of inherit ordering changes.

Move the ordering issue into the actual code execution, which isn't ideal but
the best of several bad options and at least lets us drop the anonymous python.

(From OE-Core rev: 0ffff2c1f80a9b79b133d787764bab164d9abd70)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-18 10:15:58 +00:00
Richard Purdie
12619deabd rootfs: Fix MULTILIB_RE_ALLOW to be inherit order independent
This variable is only used by the ipk backend with multilibs.

In order to make it work correctly regardless of inherit order, change
the string to be space delimeted, set using += and add in the regex '|'
sperator at the end of processing.

(From OE-Core rev: 72befdb12568fbc642022ef0a23b269c5b37a638)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-18 10:15:58 +00:00
Etienne Cordonnier
5031cf42ff package.py: fix Darwin support
- 'subprocess.Popen([d.expand("${HOST_PREFIX}otool)' requires text-mode (a more
  readable alias for the universal_newlines parameter), since otool produces
  text and the code 'out.split("\n")' expects a string, not a bytes object.
  otool is used on MacOS only, so this error isn't triggered on Linux.

- use 'startswith("darwin")' in order to support all darwin versions and not
  just specific versions (meta-darwin supports darwin21 at the moment).

(From OE-Core rev: 248ca79a6400e063c4965f9542c614bf837ff758)

Signed-off-by: Dominik Schnitzer <dominik@snap.com>
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>
2024-01-15 21:42:15 +00:00
Alexander Kanavin
f315b09758 selftest/SStatePrintdiff: ensure all base signatures are present in sstate in test_image_minimal_vs_base_do_configure
The test relies on all tasks in the dependency tree of the tasks being changed
having valid signatures in sstate, so that the recursive discovery of the
base invalid tasks stops there, and doesn't go further.

This may not always occur, particularly when hash equivalency combined with
different build host architectures prevents them from getting created in regular builds:
https://autobuilder.yoctoproject.org/typhoon/#/builders/127/builds/2725/steps/15/logs/stdio

The other two tests (that change specific recipes) already ensure this, but
this test (which changes a basic task definition) does not.

(From OE-Core rev: e37445320ca1a8913d6ed768681ff32de24eef94)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-12 11:54:05 +00:00
Yang Xu
b11e3aa995 rootfs.py: check depmodwrapper execution result
The execution result of depmodwrapper is not checked which makes depmod
generation failed sliently and hard to detect.

So check exection result and stop building if depmodwrapper failed.

(From OE-Core rev: 2f88e7d331390c6aaecc4522253e24791aec299e)

Signed-off-by: Yang Xu <yang.xu@mediatek.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-10 17:01:28 +00:00
Alexander Kanavin
46262ee83e selftest/sstatetests: include fetcher diagnostics into CDN test failure message
This will help finding out what kind of error the server actually returned,
as sporadic CDN failures continue to occur.

[YOCTO #15335]

(From OE-Core rev: 7f09c4c5a0fe4ff213f205927f618a77b72aeef3)

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>
2024-01-10 17:01:28 +00:00
Alexander Kanavin
7b3668a0aa selftest/sstatetest: re-enable gcc printdiff test
(From OE-Core rev: 976832eb0c3fc0170a84ff7ab92352ca6f18c383)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-10 16:32:13 +00:00
Alexander Kanavin
67be7cf82b selftest/sstatetests: fix up printdiff test to match rework of printdiff logic
Other than the formatting changes, there are two functional ones:

- use perlcross instead of quilt, as quilt is special in the sense
of being excluded from task hash calculcations. perlcross is a full
participant.

- run the full test (local + sstate) for gcc do_preconfiure change
as the necessary fix has been implemented
(sstatesig/find_siginfo: special-case gcc-source when looking in sstate caches)

Note that when several tasks are found to have changed (as is the case
when base do_configure is adjusted), find_siginfo() runs
glob.glob("*/*/*taskname*") against autobuilder sstate cache for each
of those tasks (six or seven times). This is an expensive operation
taking several minutes. I left it in for now, but if it's proven too slow
the test would have to be reduced to checking a specific base recipe
(e.g. zstd-native) rather than a distant image target.

[YOCTO #15289]

(From OE-Core rev: 0ef7cf324718412c5b6c376acfbc4079ecd7d465)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-10 16:32:13 +00:00
Mikko Rapeli
a703d8ddef oeqa systemd.py: settle() using "running" or "degraded" state
systemd boot has completed when system is in "running" or "degraded"
(some services failed) state. Check for that in the systemd settle()
function instead of listing all services and checking their activation
state since some services are in activation state even when whole
system is already in "running" state. Examples of services which can be
in activation state are rootfs auto mounting related generated services.

Without this patch systemd test_systemd_list (systemd.SystemdBasicTests) times
out on an image with dm-verity /usr partition and systemd generated
rootfs:

NOTE:  ... FAIL
Traceback (most recent call last):
  File "/home/builder/src/base/build/../poky/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
    return func(*args, **kwargs)
  File "/home/builder/src/base/poky/meta/lib/oeqa/runtime/cases/systemd.py", line 97, in test_systemd_failed
    self.assertTrue(settled, msg=msg)
AssertionError: False is not true : Timed out waiting for systemd to settle:
  UNIT                                                                                              LOAD   ACTIVE     SUB
     DESCRIPTION
  dev-disk-by\x2did-dm\x2dname\x2droot.device                                                       loaded activating tentativ
e    /dev/disk/by-id/dm-name-root
  dev-disk-by\x2did-dm\x2dname\x2dusr.device                                                        loaded activating tentativ
e    /dev/disk/by-id/dm-name-usr
  dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dLUKS2\x2df2b944f394174eb5918cb6af2c6b4cb2\x2droot.device loaded activating tentativ
e    /dev/disk/by-id/dm-uuid-CRYPT-LUKS2-f2b944f394174eb5918cb6af2c6b4cb2-root
  dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dVERITY\x2d3dd703c88f1946658697a6d57617473b\x2dusr.device loaded activating tentativ
e    /dev/disk/by-id/dm-uuid-CRYPT-VERITY-3dd703c88f1946658697a6d57617473b-usr
  dev-disk-by\x2duuid-bfbf856e\x2d3c65\x2d4eb2\x2d9ffb\x2d8e0b11641d85.device                       loaded activating tentativ
e    /dev/disk/by-uuid/bfbf856e-3c65-4eb2-9ffb-8e0b11641d85
  dev-dm\x2d0.device                                                                                loaded activating tentativ
e    /dev/dm-0
  dev-dm\x2d1.device                                                                                loaded activating tentativ
e    /dev/dm-1
...

Fix is to check for the systemd global "running" or "degraded" state.
Note that it would be possible to use a blocking call
"systemctl is-system-running --wait" to exit after system enters "running"
or "degraded" state but using the existing loop for a 2 minute timeout.

(From OE-Core rev: 3b013ae441d117adeda0d9950e02e9f7d0deba2f)

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-07 12:24:57 +00:00
Alexander Kanavin
4675bbb757 lib/sstatesig/find_siginfo: raise an error instead of returning None when obtaining mtime
Suppressing the error and returning None can result in a delayed failure:
https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/6254/steps/14/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/6262/steps/14/logs/stdio

It is not clear why the os.stat() error occurs to begin with (it shouldn't), so rather than
adding further workarounds, let's get diagnostics at the source first, so we understand
what is going on.

(From OE-Core rev: 35483d4756ab53805507f72a9a0edb3f83759694)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-05 12:04:52 +00:00
Richard Purdie
a7aa37f2fd sstatesig: Add version information for find_sigingfo
Since we're changing the return values of the function, add a version so
bitbake can ensure it is using a compatible function.

(From OE-Core rev: 738bf3717002d124958a21a6925b0eca14fef131)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-05 11:59:08 +00:00
Alexander Kanavin
c45ffa9e94 sstatesig/find_siginfo: unify a disjointed API
find_siginfo() returns two different data structures depending
on whether its third argument (list of hashes to find) is empty or
not:
- a dict of timestamps keyed by path
- a dict of paths keyed by hash

This is not a good API design; it's much better to return
a dict of dicts that include both timestamp and path, keyed by
hash. Then the API consumer can decide how they want to use these
fields, particularly for additional diagnostics or informational
output.

I also took the opportunity to add a binary field that
tells if the match came from sstate or local stamps dir, which
will help prioritize local stamps when looking up most
recent task signatures.

(From OE-Core rev: 8721c52041e910bd4d8a9235b52f274f4f02c8a3)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-05 11:59:08 +00:00
Jermain Horsman
01ef197c6b lib/bblayers/buildconf.py: Remove unused imports/variables
(From OE-Core rev: 720f48c0692a4cbb00535151b049704645748216)

Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-04 23:47:51 +00:00
Jermain Horsman
54f9db951a lib/bblayers/makesetup.py: Remove unused imports
(From OE-Core rev: 789549ed28c043a6d9b304f99f528546f4ade957)

Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-04 23:47:51 +00:00