The target_dumper property is only set by the QemuTarget subclass, so
assign a default value and check it isn't None before calling it.
(From OE-Core rev: add36cf85380bf7dc5339a9d65f951923317440b)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
collections.abc is available since 3.3 and doesn't need special handling.
(From OE-Core rev: 01152c9410ba00274c8415a5d914dc33dfd0cf46)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The package task references WORKDIR at it's top level and we can't
easily make the timestamp for that determnistic due to writes to files
there and in other subdirs. We could try and force it to a specific value
but it is easier to just remove it from the package task, we don't need
it there or care about it in this case.
(From OE-Core rev: 9cceeb906527f90d8dd3aad75aa3a8805e2a1df5)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Repo-wide replacement to use newer variable to represent systemd
system unitdir directory.
(From OE-Core rev: 5ace3ada5c54500c71becc8e0c6eddeb8bc053e3)
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This allows extra space to be added after the last partition and is
especially useful when free space is needed for ex: adding partitions on
first boot with ex: systemd-repart[1] and the image is tested in QEMU.
[1] https://www.freedesktop.org/software/systemd/man/systemd-repart.html
(From OE-Core rev: f81b188bcf5aa18746fd622eb7b5c0dcb0b5c93d)
Signed-off-by: Kristian Klausen <kristian@klausen.dk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Now that recipetool writes BSD-3-Clause, update the test appropriately.
(From OE-Core rev: e4cb21609e3e95725b235de48458ab3c111ee9c1)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The python-async-test recipe is now BSD-3-Clause.
(From OE-Core rev: d819d86b482d397425043c7f478712a7f225bdae)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This log checking fix is needed for both qemux86 and qemux86-64 so move
to the common section.
[YOCTO #14528]
(From OE-Core rev: 2475ce68f0bc1f342c75364dfcfaf7f30499badf)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Licenses reported in the SPDX documents should be either:
A) A valid SPDX identifier cross referenced from the SPDX license
database
B) A "LicenseRef" to a license described in the SPDX document
The licensing code will now add a placeholder extracted license with
corresponding "LicenseRef" for any licenses that are not matched to the
SPDX database
Parenthesis in the license expression are now handled correctly
(From OE-Core rev: 28d9d035c0ff8fcaf28bc96a976a43a602a47e94)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Adds a class as a first attempt to create SPDX SBoM documents during the
build. This initial work was influenced by [meta-doubleopen][1],
although almost completely rewritten.
[1]: https://github.com/doubleopen-project/meta-doubleopen
(From OE-Core rev: 78c79821ae7e2f060b9a74ea9aefce98102bb00e)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Adds extended package data which is encoded as JSON which allows it to
encode more structure than the "flat" package data files. The extended
data might be much larger than the standard package data, so it is not
read by default and instead requires
oe.packagedata.read_subpkgdata_extended() to be called
Currently, the file sizes and ELF debug sources are saved off into the
extended package data
(From OE-Core rev: db9cf430e54ae68da80fbc3fba80ce88d8df164d)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Reviewed-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake may still be shutting down when the UI exits. Wait for the lock
to disappear before trying to delete the directory to avoid errors.
Traceback (most recent call last):
File "/home/pokybuild/yocto-worker/buildtools/build/meta/lib/oeqa/sdk/buildtools-cases/build.py", line 23, in test_libc
self._run('. %s/oe-init-build-env %s && bitbake virtual/libc' % (corebase, testdir))
File "/usr/lib64/python3.7/tempfile.py", line 807, in __exit__
self.cleanup()
File "/usr/lib64/python3.7/tempfile.py", line 811, in cleanup
_shutil.rmtree(self.name)
File "/usr/lib64/python3.7/shutil.py", line 494, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File "/usr/lib64/python3.7/shutil.py", line 452, in _rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
File "/usr/lib64/python3.7/shutil.py", line 450, in _rmtree_safe_fd
os.unlink(entry.name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: 'bitbake.sock'
(From OE-Core rev: 94df60cc97058444188ec8372c2d9849e74b76c6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Currently, depends.dot includes per-file dependencies but not the packages
providing those files. This makes it hard to obtain all package
dependencies by just looking at depends.dot.
Parse the RPROVIDES and FILERPROVIDES fields from pkgdata to map each of
their values to the package providing the component. Include runtime
packages as dependencies in depends.dot, together with the component
provided by the package as a label.
(From OE-Core rev: 2ba33093017574bbe29eeba699eb90628614d03a)
Signed-off-by: Andres Beltran <abeltran@linux.microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
We don't use the CD/DVD ROM drive in any of our tests, but it
periodically fails discovery and that leads to a QA error:
[ 6.403477] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4)
The only way to disable the optical ROM drive in qemu is to use
the '-nodefaults' option, which disables the CDROM (among other things).
We can't be sure that none of our tests, or extended users are relying
on default devices, so using that option is more of a risk than adding
the message to our ignore list.
To date, no one has sent a patch to just disable the optical drive
(either in qemu or the BIOS), but that is something we could consider
in the future.
[YOCTO #14528]
(From OE-Core rev: 143fc5504539c69752ca87717507c197a8920ce5)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This is done when starting up qemu has failed, but is not done
when qemu started ok, but fails later in QMP communication.
Output from runqemu does contain valuable information to find out
why, so rather than fix all the QMP fails to include it, let's just
print it in stop().
(From OE-Core rev: 6e2bf68e4401db747484c2c8ba0f77500b1d2d49)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
rust-llvm-liblto and rust-llvm-staticdev sometimes vary in contents. Exclude
them from the test for now until we can work on and resolve the issues.
(From OE-Core rev: 60c12da5aae2534c972df851f26e4523fed03afc)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Since the target rust recipe is skipped but the native variant is not,
this confuses the test. Add rust to the list of special cases to avoid
test failures as the current code can't handle the skip.
(From OE-Core rev: 842cba1820416d79e30e3f1940e2486707fc7cff)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This patch is a follow on of the the PR server rework in bitbake to add
read-only support. The shift to using the bb.asyncrpc code in the PR
server and client brings issues with respect to reuse of the same
asyncio loop in different processes. This patch removes the PR service
connection caching to avoid one source of this problem. It is believed
that in practice this should have little impact on overall performance.
(From OE-Core rev: 0fc3055027e2a76ac863f1c0e0d52e95748066aa)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This is particularly useful for llvm-accelerated GL rendering from qemu guest to
an offscreen buffer (accessible over vnc or spice) using llvmpipe on the
host, rather than using unaccelerated swrast renderer in the guest.
This is the best that can be done in the absence of a host GPU with render node
support (such as old Matrox cards common in servers, or fully virtualized cloud
environments with no GPU at all).
Note: even though NVidia blob drivers do support render nodes, they do not
support gbm (yet?), and so rendering will fall back to llvmpipe as well even when
the system has a 3000 euro NVidia GPU. Cue Linus picture.
(From OE-Core rev: 9b1daa173481f7f560e00e0dc22b4010ff1dc0ec)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Add entries for Android to the mappings.
(From OE-Core rev: 2cec34178d6e5864c5d6280532a77cfb9cb255ea)
Signed-off-by: Hsia-Jun Li <randy.li@synaptics.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Add tests for the --no-fstab-update wic part command.
(From OE-Core rev: 90141d41a370ff377d95fb3dd144b63a85e22f8e)
Signed-off-by: Daniel Gomez <daniel@qtec.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Verify that HTTPS connections work in both wget and Python, as this
depends on variables correctly pointing to the certificate chain.
(From OE-Core rev: 5c2b1fb09e786ec392979d21dc7884ca23cd84f0)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The buildtools-extended tarball includes GCC, which relies on being
relocated correctly to work. Add a test case that verifies that the
loader paths have all been relocated, as otherwise there are
hard-to-debug errors at build time.
(From OE-Core rev: fe1f675ea156722a3709b13cd751479c9528134d)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Add tests to ensure that PKGSIZE and FILELIST fields are set correctly.
(From OE-Core rev: 8e957f9dbf794195af093f3fbc00b4c8d269ee37)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
We dont control the test output and sometimes see badly encoded characters.
These don't affect the operation of the code we're running. Use
errors='replace' to avoid those issues and the resulting test failures.
(From OE-Core rev: 3939b1923387d3bc440118ed1663d28a03a1ea5d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The test uses the broken out time and can only handle about 59s of delay,
use a UNIX timestamp to allow for up to a 300s delay.
[YOCTO #14463]
(From OE-Core rev: b705e9373acd4119da75af4eb96ec92cc964aa86)
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Fix read_subpkgdata_dict to account for the new override operator being
":" instead of "_"
(From OE-Core rev: 0b04ae769d4fad2caaa858803d8fbbbaec689541)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Moving the function will allow other classes to capture which CVEs have
been patched, in particular SBoM generation.
Also add a function to capture the CPE ID from the CVE Product and
Version
(From OE-Core rev: 75d34259a715120be1d023e4fd7b6b4b125f2443)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Other keys (UBOOT_SIGN_IMG_KEYNAME) are required to sign individually the images
nodes, and these keys must be different from the ones used to sign the
configurations nodes (UBOOT_SIGN_KEYNAME), then fitimage tests need to be
updated.
(From OE-Core rev: dbaca2c2522ed0dc3d0a2f80dc4510aaec177afc)
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
These two tests are designed to exercise the buildtools-tarball.
SanityTests simply verifies that inside the SDK, some commands are used
from the SDK.
BuildTests creates a new OE build directory and builds virtual/libc to
verify that a basic build works correctly. DL_DIR is reused to avoid
needless downloading, but sstate is not shared to ensure a build does
happen.
(From OE-Core rev: 6157d6ffa32d6df383c29d4b6de07feb9d619913)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Some tests such as lttng-tools are marginal and timing out on the autobuilder
with the current 300s default. Increase to avoid this noise in the ptest
failures list.
(From OE-Core rev: 5fb902a52e35130af6b0735a087c709daa35655f)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The IMAGE_TYPEDEP variable would make more sense to match the form of the
other image override variables, convert it to use the overrides format.
(From OE-Core rev: 8573f6b2a7af9867da0b21936ffd2cd2a417de1d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This demonstrates more of the tricks and techniques that can be used
to achieve gpl3-free images withough having to roll back to ancient
versions of various core items via meta-gpl2.
(From OE-Core rev: cb78db7aa14f147ce79c12539c9435cab06f92bf)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The automated conversion of OE-Core to use the new override sytax isn't
perfect. This patches some mis-converted lines and some lines which were missed
by the automation.
(From OE-Core rev: 4e9a06b64b43131b731fb59a0305f78a98e27fbd)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This is the result of automated script conversion:
scripts/contrib/convert-overrides.py <oe-core directory>
converting the metadata to use ":" as the override character instead of "_".
(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
All of the errors being masked off for qemuarm are legacy from before
the migration of qemuarm to qemuarmv5. Rename the machine to that to
allow for qemuarmv5 to pass parselog test. Light testing shows no
errors in dmesg for qemuarm.
(From OE-Core rev: 701a58504de15b244b970908f2de0971a35b5a09)
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Removes the /var/cache/ldconfig auxiliary cache directory from
the rootfs when:
- read-only-rootfs is in IMAGE_FEATURES,
- ldconfig is not in DISTRO_FEATURES.
In both cases the /var/cache/ldconfig/aux-cache is useless.
(From OE-Core rev: e7a18904582b27fd12a437ff4d8d25c625af7696)
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
PACKAGE_CLASES should be PACKAGE_CLASSES.
(From OE-Core rev: 7a96f3bceb2c857f841b1dbeb4587a8aaace529e)
Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
After rng-tools upgraded to 6.13, the RNDR instruction added
as an entropy source [1]. But for some cpu which doesn't support
rndr, there comes below warning message:
# systemctl status rngd
[snip]
Jul 20 06:48:07 qemuarm64 rngd[163]: [rndr ]: No HW SUPPORT
Jul 20 06:48:07 qemuarm64 rngd[163]: [rndr ]: Initialization Failed
[snip]
Actually the failed message doesn't matter as it only indicates
one entropy source rndr fails to initialize and won't affect rngd
function, so ignore the failure message to fix below error during
do_testimage.
NOTE: ======================================================================
NOTE: FAIL: test_parselogs (parselogs.ParseLogsTest)
NOTE: ----------------------------------------------------------------------
NOTE: Traceback (most recent call last):
File "/build/layers/oe-core/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f
return func(*args, **kwargs)
File "/build/layers/oe-core/meta/lib/oeqa/runtime/cases/parselogs.py", line 382, in test_parselogs
self.assertEqual(errcount, 0, msg=self.msg)
AssertionError: 1 != 0 : Log: /build/tmp/work/qemuarm64-wrs-linux/wrlinux-image-std/1.0-r5/target_logs/daemon.log
-----------------------
Central error: 2021-06-23T20:44:18.374494+00:00 qemuarm64 rngd[162]: [rndr ]: Initialization Failed
(From OE-Core rev: 1edc840d6921668b69d248f9b32fa1d5c95e3138)
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Files in /proc/xxx/map_files/ may no longer exist, just ignore this rather than
raising an exception.
(From OE-Core rev: fb1027896a263cd91e2378a4e97dbdf0807b306b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
If the recipetool tests are run with an empty DL_DIR the fetch of
socat 1.7.3.0 fails as that URL doesn't exist anymore.
Update the version to 1.7.4.1 to fix the test.
(From OE-Core rev: 42ebda0c85f14f9f8a508f59115b141d645d4c77)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>