Commit f439b47ed "boot/grub2: add RISC-V 64bit EFI support" [1]
introduced the grub2 RISC-V UEFI support.
At that time, it was not possible to have a runtime test for this.
qemu-system-riscv64 is not in the Buildroot Docker reference image,
and the base distribution (Debian 11) does not provide a
sufficiently recent version. A qemu-system-riscv64 >= 8.0.0 is needed.
Commit 0d4177598 "support/testing/infra/emulator.py: add build host
dir to qemu search path" [2] added the capability to use the
Buildroot host-qemu package inside runtime test.
With this support, it is now possible to add a runtime test for a
grub2 UEFI boot on RISC-V 64bit.
Also, due to an upstream edk2 git submodule issue, this commit
includes a workaround to use https://sources.buildroot.net for this
test. See [3].
[1] f439b47ed6
[2] 0d4177598c
[3] 47fc9e5509
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
The EDK2 bump to stable202405 introduced an incompatibility with the
Qemu version 5.2.0 present in the reference Docker image. For that
reason, this test was disabled.
This commit enables host-qemu in the build, to be used by the runtime
test infrastructure.
Since this commit switch to a more recent host-qemu, it also removes
firmware options to workaround old qemu bugs.
Those changes are fixing this test, which is why this commit re-enables
it by removing the skipTest() invocation.
Signed-off-by: Julien Olivain <ju.o@free.fr>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
The EDK2 bump to stable202405 introduced an incompatibility with the
Qemu version 5.2.0 present in the reference Docker image. For that
reason, this test was disabled.
This commit updates ATF to 2.11, and enables host-qemu in the build,
to be used by the runtime test infrastructure.
Those changes are fixing this test, which is why this commit re-enables
it by removing the skipTest() invocation.
Signed-off-by: Julien Olivain <ju.o@free.fr>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
The EDK2 bump to stable202405 introduced an incompatibility with the
Qemu version 5.2.0 present in the reference Docker image. For that
reason, this test was disabled.
This commit updates ATF to 2.11 and kernel to 6.6.58, and enables
host-qemu in the build, to be used by the runtime test infrastructure.
Those changes are fixing this test, which is why this commit re-enables
it by removing the skipTest() invocation.
Signed-off-by: Julien Olivain <ju.o@free.fr>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
The relevant qemu emulator is started with pexpect.spawn() with a
default environment (and PATH). This will always use the qemu available
on the host. When running in the reference Docker image, it is using an
old Qemu v5.2.0. This version is getting too old to run with more
recent components, like EDK2 or ATF.
The main reason to use a qemu version preinstalled in the Docker image
was to save some build time. Also, this behavior is opposite to the
"start-qemu.sh" helper script [1], which tries to execute the
Buildroot host-qemu first (and then fallback the the version on the
host system, if available). An option was added in [2] to let the user
have a better control on which version is used.
Also, updating the Buildroot reference Docker image has a larger
impact on the whole project (i.e. updating the image would bring
a newer qemu version, but might break many other things, at a time
which is not always convenient).
We now need some kind of control in runtime tests, to choose between a
"stock" qemu, and a more recent version with all the bells and
whistles.
This commit adds the Buildroot host build directory in the path. This
will make the runtime test infrastructure to use a host-qemu, if
selected by a runtime test configuration.
For now, most of the test can continue to use the qemu version provided
in the Docker image. Only the problematic tests relying on a recent
version will select BR2_PACKAGE_HOST_QEMU=y. The host-qemu package is
usually maintained to a recent version, so this should be sufficient.
[1] https://gitlab.com/buildroot.org/buildroot/-/blob/master/board/qemu/start-qemu.sh.in
[2] 5de78f181a
Signed-off-by: Julien Olivain <ju.o@free.fr>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
EDK2 version edk2-stable202405 (not yet in Buildroot) has dependencies
on specific Qemu version.
Buildroot guidelines also recommend that "each patch must be complete".
See: [1]. This means, a patch in a series is not allowed to break
something knowingly, even in the same patch series. This rule is
mainly for using git bisect.
We also want to avoid bumping EDK2, update the runtime test infra,
and few tests in a big single commit, for readability. This would mix
too many changes in the same commit.
As a trade off, this commit disables the runtime tests which are known
to be broken by the upcoming edk2 update. Then, those tests will be
individually fixed and re-enabled in followup commits.
This EDK2/Qemu incompatibility only affects runtime tests using EDK2
on the Arm Aarch64 architecture. This commit disable the runtime
tests by adding a "skipTest()" call in:
- tests.boot.test_edk2
- tests.boot.test_grub.TestGrubAArch64EFI
- tests.package.test_fwts
[1] https://buildroot.org/downloads/manual/manual.html#submitting-patches
Signed-off-by: Julien Olivain <ju.o@free.fr>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Since python-incremental 24.7.0, there is no longer a dot before an rc
specifier [1].
Update TestPythonPy3Incremental expected result to
"[package, version 1.2.3rc4]".
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/8199992642
[1] d482dfff3f
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Currently the test TestPythonTwisted is not broken [1] since it doesn't
test all modules provided by python-twisted package.
But TestPythonTwisted should have failed due to missing xml in
twisted/web module.
Due to this, TestPythonPy3MagicWormhole runtime test is currently
broken.
Add missing python3-xml dependency and update
sample_python_twisted.py to load twisted/web that uses xml
module.
Fixes (partially due to missing python setuptool in
python-magic-wormhole-mailbox-server):
https://gitlab.com/buildroot.org/buildroot/-/jobs/8199992646
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Generating Bitcoins to an address can take longer than the current
timeout, on slow runners. This commit fixes this issue by increasing
the timeout on specific commands. This issue was also observed more
frequently on newer bitcoin-core version 28.0.
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/7782083081
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
When I initially made the CVE cells collapsible, I neglected to
count the unsure CVEs. This patch adds unsure CVEs to the cell collapsing
calcualation to ensure that cells with lots of unsure CVEs actually get collapsed.
This patch also removes the "+ 1" from the cve_total calculation,
which fixes the cve_total being off-by-one.
I'm not sure *why* I did that in the first place.
demo:
https://sen-h.codeberg.page/pkg-stats-demos/@pages/add-unsure_cves-to-cve_total-calc.html
Signed-off-by: Sen Hastings <sen@hastings.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit c7618236c1)
[Peter: drop Makefile change]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Add a test that runs the dtc commandline tools. To test devicetree
compilation, we use an example devicetree from the dtc project. The
example source is GPL-2.0+ licensed.
Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
With the introduction of ARM FDPIC support, we need to make sure that
the existing ARM FLAT external toolchains are not made
visible/available when ARM FDPIC is selected. This commit updates the
gen-bootlin-toolchains script to take this into account.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Commit a87abcf6da (Makefile: run PPD and RPATH fixup in host-fialize)
(sic) moved the fixups peviously done in prepare-sdk, to host-finalize.
This exposed a bug in fix-rpath, when RPATH contains multiple entries,
like: /PPD/host-foo/host/lib:/PPD/host-foo/host/lib/foo
In that situation, we want to get rid of /PPD/host-foo and replace it
with the finale HOST_DIR, so we mangle the RPATH with a sed expression.
However, that sed expression only ever replaces the first match, as it
is missing the 'g' option. Thus, the second (and following) parts of
RPATH are still referring to the PPD, and thus patchelf does not find it
relative to the final HOST_DIR, amd rops it. This eventually lead to a
final RPATH set as $ORIGIN/../lib instead of the expected
$ORIGIN/../lib:$ORIGIN/../lib/foo
This is the case for host-systemd, which installs some of its libraries
in $PREFIX/lib/systemd/ and adds an RPATH set appropriately to
/PPD/host-systemd/host/lib:/PPD/host-systemd/host/lib/systemd and that
gets incorrectly mangled.
Fixes: https://gitlab.com/buildroot.org/buildroot/-/issues/39
Also fix a typo in the comment just above.
Reported-by: José Luis Salvador Rufo @jlsalvador
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Tested-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Reviewed-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Tested-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Reviewed-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Test the go-bin provider of host-go to build a Go package.
The tests consist of building and installing a Go package in the root
file system of an ARM vexpress QEMU system.
The tests pass if the program runs on the target.
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
[yann.morin.1998@free.fr: use to flannel, which can be vendored today]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
The test currently uses tinifier, but it can't be vendored as of today,
so switch to use flannel which can (still?) be...
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Currently, the runtime tests will use the sources.buildroot.org backup
mirror, which is the default setup.
However, in some cases we do not want to use the backup site, because we
want to ensure that the download actually works.
This is the case for vendored packages, like cargo or golang packages,
for whbich we want to check that gthe download still works when we
update the rust or go versions, or when our download helpers change.
So, disable the use of the backup site in all runtime tests, and drop
the no-longer needed special cases.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This reverts commit e0ed05cc00.
Since this commit has been applied, the update of the NVD data fails:
Checking packages CVEs
Updating from https://github.com/fkie-cad/nvd-json-data-feeds/
Traceback (most recent call last):
File "/home/buildroot/buildroot-stats/./support/scripts/pkg-stats", line 1346, in <module>
__main__()
File "/home/buildroot/buildroot-stats/./support/scripts/pkg-stats", line 1335, in __main__
check_package_cves(args.nvd_path, packages)
File "/home/buildroot/buildroot-stats/./support/scripts/pkg-stats", line 660, in check_package_cves
for cve in cvecheck.CVE.read_nvd_dir(nvd_path):
File "/home/buildroot/buildroot-stats/support/scripts/cve.py", line 105, in read_nvd_dir
CVE.download_nvd(nvd_git_dir)
File "/home/buildroot/buildroot-stats/support/scripts/cve.py", line 74, in download_nvd
subprocess.check_call(
File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'pull', '--depth', '1']' returned non-zero exit status 128.
Since we couldn't immediately figure out what's going on, let's revert
for now until this get investigated and fixed.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>