Commit Graph

1895 Commits

Author SHA1 Message Date
Yann E. MORIN
0209d05619 support/scripts: fix RPATH fixups
Commit a87abcf6da65 (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>
(cherry picked from commit 2100a76d9ef620d9749352fb85f83720412598ec)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-10-12 15:55:44 +02:00
Julien Olivain
c68d24a718 support/testing: fs: new erofs runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 21e9bb0967a6534e73138a8e645a5c80fc442b0d)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-10-11 17:03:21 +02:00
Brandon Maier
4b19a190a2 support/testing/infra/emulator.py: fix qemu prompt detection
The qemu.run() method can break when a command happens to output the
string "# " to stdout. This is because qemu.run() detects when a command
has completed by searching for the shell prompt, which by default is
"# ". It then captures everything before the "# " as the commands
output, causing the rest of output to be lost.

Instead use the pexpect libraries REPLWrapper to handle running
commands. It has hooks to set a custom prompt and avoid some other
pitfalls of wrapping a shell.

We unfortunately can't reuse replwrap._repl_sh directly, because it
tries to spawn a command while we already have a qemu started. So we
need to copy that code into _repl_sh_child. While we're at it, also
define our own prompt strings.

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
[Arnout:
 - Make all arguments to _repl_sh_spawn non-optional.
 - Move non_printable_insert to a local variable instead of an argument,
   we don't need to override it.
 - Copy the comment from _repl_sh that explains why non_printable_insert
   is needed.
 - Add a comment about timeouts.
 - Rename spawn to child (we don't actually spawn anything so this felt
   more natural, even though the class
 - Use single quotes instead of triple quotes, and explicitly escape the
   nested quotes.
]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>

(cherry picked from commit 0cad947b964be5612a182413da136fcf0dc5a1f2)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-10-11 17:03:20 +02:00
Julien Olivain
d523f2b10c support/testing: add pv runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 8c5e4be97c8083589665420e438d8b43515b3a00)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-10-03 16:45:25 +02:00
Julien Olivain
40499fc13a support/testing: add exfatprogs runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit f36652898770d92a90ba6240f96cab679457b33e)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-10-03 16:31:17 +02:00
Peter Korsgaard
460200bbe2 support/misc/Vagrantfile: support libvirt provider
And configure memory/CPU like for the other providers.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 75b543880ceaeb8ff039b0cf3a2ba3e1d38aba37)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-09-19 10:33:20 +02:00
Peter Korsgaard
f24ec49d66 support/misc/Vagrantfile: move to Debian bullseye (12)
Ubuntu Bionic (18.04) was EOL'ed in June 2023:

https://ubuntu.com//blog/18-04-end-of-standard-support

And the VM image is only available in virtualbox format:

https://app.vagrantup.com/ubuntu/boxes/bionic64

So move to Debian bullseye (12), matching what we do for the docker image.
This is available in virtualbox and libvirt (qemu) format:

https://app.vagrantup.com/debian/boxes/bullseye64

Bullseye does not come with rsync out of the box, so install it.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 6cedd92744341c1c9b5f76026db05a9fd653485d)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-09-19 10:32:54 +02:00
Peter Korsgaard
d9b046e634 Update for 2024.02.6
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-09-09 16:33:59 +02:00
Julien Olivain
6ca8443f98 support/testing: package: gpsd: fix test by enabling python support
Commit 9696d27756 "package/gpsd: condition python stuff to the proper
kconfig option" changed the condition in which the gpsd python scripts
are installed. After that change, the "gpsfake" command (which is a
python script) is no longer found and the runtime test is failing.

This commit fixes the issue by reflecting the change in the runtime
test Buildroot configuration.

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit b6f4d79df21b2affa1ccc5133c44647072d21058)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-09-03 21:30:38 +02:00
Julien Olivain
78a29492f5 support/testing: package: mariadb: fix test configuration
The mysql virtual package was removed in commit 8708f3a23a
"package/mysql: drop virtual package".

The mariadb runtime test was authored before this mysql virtual
package removal, but was merged after it, in commit 5356754d1e
"support/testing: add mariadb runtime test". Due to this, this test
always failed with the error:

    Makefile.legacy:9: *** "You have legacy configuration in your .config! Please check your configuration.".  Stop.

This commit fixes the issue by removing the legacy
BR2_PACKAGE_MYSQL=y configuration directive.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/7540345406

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 3da3361a1b9cafb274dac776693720fe20f6681b)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-09-03 20:21:51 +02:00
Julien Olivain
7254104a3d support/testing: add mariadb runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 5356754d1e11174274553f2f7329edd7e8c7fd68)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-09-03 20:21:27 +02:00
Julien Olivain
1b56d43b87 support/testing: add make runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 3e1e49069d5fc67b434de94637409c6ced915dea)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-09-03 20:08:25 +02:00
Julien Olivain
d46b2f5fea support/testing/infra/emulator.py: add host load info in run log
Runtime tests running on test runners are subject to a high
variability in term of performance and timing. Most or the runtime
test commands are executed with a timeout, in pexpect.

Slow or very loaded test runners can use the timeout_multiplier to
globally increase those timeouts.

Some runtime test commands sometimes needs to poll or query a state,
rather than having purely sequential actions. It is sometimes hard to
know, from the test writer point of view, the maximum timeout to set, or
if a retry logic is needed.

In order to help debugging runtime tests failing due very slow
execution, this commit adds extra information on the host test runner
about its load in the run log. Relevant information are: number of
cpus, the load average at the moment the emulator is started and the
current timeout_multiplier.

Note: this change was discussed in:
https://lists.buildroot.org/pipermail/buildroot/2024-July/759119.html

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 7a6edbc7b9166c799b43cf9a9b78422c8e20ccc0)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-09-01 16:47:07 +02:00
Julien Olivain
d2a0b6bfbd support/testing: add 4th runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit b09ae4f0454105afd2b41b2a49f4682d9ee57769)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-31 16:05:53 +02:00
Julien Olivain
6d0bfa6b8f support/testing: add iproute2 runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 91738f5093f80eeda8637b9a73636539d6937475)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-31 12:09:02 +02:00
Julien Olivain
842401fca0 support/testing: add nmap runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 5510d2890fc628bf08805f83e3430d759c15a8ec)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-30 14:09:21 +02:00
Julien Olivain
37d82d410e support/testing: package: gpsd: fix gpsfake command line
The gpsfake command line has a typo (a missing space), which makes the
next gpsctl command to always fail.

This commit fixes the issue by adding the missing space.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/7391792948

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 49156a0fa4a48d5d80f03c3854f631f312b486d4)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-29 15:35:07 +02:00
Julien Olivain
fdce4439ae support/testing: add gpsd runtime testing
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 9c8f6dc5e4d7244b493e290c055202cadc9a12cb)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-29 15:01:57 +02:00
Julien Olivain
f7fc0d1904 support/testing: add mawk runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit f04a95f79f087869a44ea3d63d55ce7b27b8e922)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-29 12:13:46 +02:00
Marcus Hoffmann
d592786c37 support/testing: add python-asn1crypto runtime test
Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 2fe638af2632424b826843675311f9a258a57b71)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-27 18:10:07 +02:00
Julien Olivain
b250a2db63 support/testing: fs: new btrfs runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 009f9106d991c9adbf8e57869d4355e0f71da31b)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-22 14:17:26 +02:00
Marcus Hoffmann
e255cb1c26 support/testing: add python-msgpack runtime test
Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit d429d5d399acc9921a9a86f4ae3d589d599605e4)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-20 21:32:15 +02:00
Julien Olivain
c657ece0cd support/testing: add attr runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 2da40a2fd7a0007ff1a51bc957980f516746a6ad)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-20 21:30:59 +02:00
Yann E. MORIN
145e8e7406 support/download/check-hash: accept hash files without terminating \n
Lots of people are using broken text editors that 1. do not naturally
terminate text files with a final \n as is customary in UNIX text files,
and 2. do not respect our .editorconfig settings, which explicitly
require adding that final newline. See this nice summary of what a text
file is (with references to applicable standards):

    https://stackoverflow.com/questions/12916352/shell-script-read-missing-last-line/12916758#12916758

So, it is not surprising that read does not read the last "line" of a
file, when said "line" does not end with a newline, because it is thus
not really a line.

Even though we do mandate actual text files, let's be a little bit lax
in this respect, because people may write packages, and their hash
files, in a br2-external tree, and they may not have our .editorconfig
in the directory heierarchy (e.g. if buildroot is a submodule of their
br2-external tree, or whatever).

mapfile does not suffer from this limitation, though, and correctly
reads all lines from a file, even the final line-that-is-not-a-line.

mapfile was introduced in bash 4.0, released on 2009-01-20, more than
15 years ago. Debian squeeze, released in 2011 already had bash 4.1.
Those are really ancient. So, it means we can indeed expect bash
version 4.0 or later; which means mapfile is available.

"It should be fine!"

Fixes: #15976

Reported-by: masonwardle@gmail.com
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit ac2e6b392791085bc29fa21901265a8eed4ae0ee)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-20 19:20:00 +02:00
Yann E. MORIN
11f75a2309 support/scripts/mkusers: accept user tables without terminating \n
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 5d8445138bd466f80dd45dab1b9fb7279f1536eb)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-20 19:18:10 +02:00
Peter Korsgaard
6c084947ab Update for 2024.02.5
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-14 13:32:31 +02:00
Julien Olivain
82d261cfe3 support/testing: new btrfs-progs runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 14b3ca20c9cb15f688dc164bb22c3c3712301d15)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-12 22:20:35 +02:00
Raphaël Mélotte
65b37af817 support/testing: add new test for python-pymupdf
To give us a chance to catch runtime issues (such as missing
dependencies) more easily, add a test that writes a sample PDF file,
read it back and verify the text that was read.

Like similar packages that lead to a big
rootfs (e.g. python-botocore), this test requires a separate ext2
rootfs to avoid filling the default amount of RAM available
entirely (which would cause missing files from the root filesystem and
in turn, test failures).

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 115e9493b8e3b50cd56b93c47d669319d02698a7)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-12 11:20:51 +02:00
Julien Olivain
0f8fc92755 support/testing: new xfsprogs runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 1fb08cdc85fab4ba1460cd15e0829494afc0fdf2)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-12 09:10:31 +02:00
Julien Olivain
fd6e1c41b9 support/testing: add mosquitto runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 3ba6f800fdc2435d09aca215ef2e8aefb3165bff)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-08-01 12:58:54 +02:00
Marcus Hoffmann
7e0a94b70f support/testing: add new python-ruamel-yaml runtime test
Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 21da0df09db09700948c27782d0bb446a0ad66f8)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-07-31 17:25:08 +02:00
Julien Olivain
f5b363058b support/testing: add kmod runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 48790b43296f45aa7f9f8c6701e94fe86269c241)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-07-28 09:23:11 +02:00
Peter Korsgaard
e0a2687421 Update for 2024.02.4
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-07-13 14:29:13 +02:00
Brandon Maier
4fce66e217 support/scripts/apply-patches: fallback $TAR to tar
Commit f77d698f83 changed apply-patches to
use $TAR instead of `tar`, but did not define a fallback if $TAR is not
defined. This results in an error when calling apply-patches.sh from
outside Buildroot's Makefile. Our team uses this script to setup local
checkouts of Buildroot package's with patches for development.

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 118c824b565442bfe1d4ae1c0a39d330e624b854)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-07-08 08:40:16 +02:00
Yann E. MORIN
ebc3216762 support/scripts/apply-patches: use appropriate TAR
Note that here, it is in fact not really relevant. We only extract a
tarball, and we don't use any "modern" or GNU-only options like
--strip-components. However, for consistency it's better to use the same
tar everywhere.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: "Maier, Brandon L Collins" <Brandon.Maier@collins.com>
Reviewed-by: brandon.maier@collins.com
[Arnout: quote TAR="..."]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit f77d698f83)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-07-08 08:40:13 +02:00
Julien Olivain
36d6d1de0b support/testing: add ntp runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit c986928affc59f5bbefae8c7af963eaf45fdc8c8)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-07-06 22:44:56 +02:00
Brandon Maier
9a780d2aca support/testing/infra/builder.py: fix missing $HOME during build
When running a test that uses host-python-setuptools using the Buildroot
Docker image, for example running the following command,

> ./utils/docker-run ./support/testing/run-tests -o output -s -k tests.package.test_python_pytest.TestPythonPy3Pytest

The build fails with the following error,

>   File "/home/blmaier/buildroot/output/TestPythonPy3Pytest/build/host-python-setuptools-69.2.0/setuptools/_distutils/dist.py", line 354, in _gen_paths
>     yield pathlib.Path('~').expanduser() / filename
>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/home/blmaier/buildroot/output/TestPythonPy3Pytest/host/lib/python3.11/pathlib.py", line 1385, in expanduser
>     raise RuntimeError("Could not determine home directory.")
> RuntimeError: Could not determine home directory.
>
> ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel

Python setuptools is looking for $HOME but failing to find it.

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 4dafb8b5c2)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-15 20:36:51 +02:00
Yann E. MORIN
276917e32a support/download/cvs: use appropriate TAR
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit c013836ae6)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-15 20:29:54 +02:00
Yann E. MORIN
c091bd89cf support/download/cvs: fix shellcheck
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 84309d7071)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-15 20:29:39 +02:00
Yann E. MORIN
6ec2b2cad4 support/download/helpers: use appropriate TAR
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 86f6c7929e)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-15 20:29:26 +02:00
Peter Korsgaard
45c7276a97 support/testing: sample_python_pybind.py: use python3 shebang
No functional change as we install a python symlink, but use python3 for
consistency with the other scripts.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit ed9288505c)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-13 14:34:45 +02:00
Peter Korsgaard
a73dd8f787 Update for 2024.02.3
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-10 09:37:56 +02:00
Brandon Maier
bb0164a6d2 support/testing: add mtd test
Signed-off-by: Brandon Maier <brandon.maier@collins.com>
[yann.morin.1998@free.fr:
  - don't set an empty BR2_ENABLE_LOCALE_WHITELIST
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 5806419b91)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-08 18:54:51 +02:00
Julien Olivain
9592b990d5 support/testing: improve python-magic-wormhole test reliability
The python-magic-wormhole runtime test can randomly fail on slow
runners, see [1].

The issue is that the sending command is started first in background
_without_ redirecting its output to /dev/null. The receiving command
is started after, expecting the message to be printed on the first
standard output line. On slower systems, the sending command still
print messages while the test controller expect output from the
receiving command. The expected string finally appear, but not on the
first line. This makes the test fail.

This commit fixes the issue by redirecting all outputs (stdout, stderr)
of the sending command to /dev/null. To help even more, the sleep time
is moved from the emulator to the test controller. The sleep time is
also multiplied by the timeout_multiplier.

Fixes: [1]

[1] https://gitlab.com/buildroot.org/buildroot/-/jobs/6888691508

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
(cherry picked from commit 9a734700d7)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-08 15:50:17 +02:00
Brandon Maier
188d0e5f6f support/testing: add zip test
Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 23ef540288)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-08 09:28:50 +02:00
Julien Olivain
04b6b4f59c support/testing: add gnuplot runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 92ae6d75c1)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-08 08:30:39 +02:00
Julien Olivain
1e70541c85 support/testing: add zbar runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 85f0941532)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-03 18:06:23 +02:00
Julien Olivain
bf952b0cb7 support/config-fragments: fix bootlin-x86-i686-musl
Commit a8be4a04ad "support/config-fragments: replace
br-i386-pentium-mmx-musl" replaced this old toolchain by
bootlin-x86-i686-musl.

When using test-pkg with all toolchains, bootlin-x86-i686-musl is always
failing. The issue can be reproduced with for example:

    utils/test-pkg -a -p busybox

The issue can also be reproduced with a simple config like:

    cat > .config <<EOF
    BR2_i386=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
    BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_MUSL_STABLE=y
    BR2_PACKAGE_BUSYBOX=y
    EOF
    make olddefconfig
    make

Compilation fail with output:

    Cannot execute cross-compiler '/i586-linux-gcc'

This issue happen is because the toolchain can never be selected.

The config fragment [1] selects BR2_i386 alone.

The target architecture variant default to i586 if target
architecture is i386. See [2].

Finally, the generated toolchain options includes a depends on
BR2_i386 and !BR2_x86_i586, making the toolchain always ignored.
See [3].

This commit fixes the issue by adding BR2_x86_i686=y to the
bootlin-x86-i686-musl.config fragment as suggested by the
Bootlin toolchain fragment [4].

[1] a8be4a04ad/support/config-fragments/autobuild/bootlin-x86-i686-musl.config
[2] https://gitlab.com/buildroot.org/buildroot/-/blob/2024.02.2/arch/Config.in.x86?ref_type=tags#L38
[3] https://gitlab.com/buildroot.org/buildroot/-/blob/345ccb523e/toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options#L5768-5770
[4] https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/fragments/x86-i686--musl--stable-2024.02-1.frag

Signed-off-by: Julien Olivain <ju.o@free.fr>
[Romain: add the link to the Bootlin toolchain fragment]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
(cherry picked from commit 1263adf7a9)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-03 17:52:06 +02:00
Fabrice Fontaine
30cb9d9f90 support/config-fragments: replace br-i386-pentium-mmx-musl
Replace br-i386-pentium-mmx-musl by bootlin-x86-i686-musl to avoid the
following build failure with efivar and musl < 1.2.3 as suggested in
https://patchwork.ozlabs.org/project/buildroot/patch/20240303171115.1140763-1-ju.o@free.fr:

/home/buildroot/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: ./libefisec.so: undefined reference to `qsort_r'

Fixes:
 - http://autobuild.buildroot.org/results/a0ed3970da8a84d884b26c081b49b8d2b7208829

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit a8be4a04ad)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-03 17:49:43 +02:00
Julien Olivain
079b471563 support/testing: add socat runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit b1bbc7ac6e)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-03 17:32:48 +02:00