Commit Graph

457 Commits

Author SHA1 Message Date
Julien Olivain
4b291f1bac support/testing: octave: increase test timeout
Octave package test can occasionally fail due to timeout while testing
some octave modules. This commit slightly increase the timeout value
to reduce those failures.

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-08 23:07:23 +02:00
Emile Cormier
bfafb08c62 package/python-crossbar: adjust dependencies based on requirements-min.txt
This commit makes sure that the python-crossbar package pulls in the
right dependencies, based on the requirements-min.txt.

It does so by:

 - Changing the 0002-Remove-idna-requirement patch by a more thorough
   patch that drops all indirect dependencies from
   requirements-min.txt, making it easier to have a 1:1 mapping
   between lines in requirements-min.txt and Buildroot selects.

 - Changing the
   0003-crossbar-webservice-wap-use-markupsafe-instead-of-we patch to
   update requirements-min.txt to indicate the new MarkupSafe
   dependency. Here again, to have a 1:1 mapping between lines in
   requirements-min.txt and Buildroot selects.

 - Updating the Buildroot selects to match requirements-min.txt, with
   relevant comments when it does not.

 - Fixing up the Crossbar test case to no longer force autobahn to use
   umsgpack. Instead, we now use the default of msgpack that is
   expected by autobahn.

Fixes bug #14556, https://bugs.busybox.net/show_bug.cgi?id=14556.

Signed-off-by: Emile Cormier <emile.cormier.jr@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-08 22:27:35 +02:00
Thomas Petazzoni
37f05c2497 package/python-qrcode: new package
Needed by python-autobahn encryption subpackage.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-08 22:24:45 +02:00
Yegor Yefremov
b25c3f1d43 support/testing: add test for python-dtschema
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-07 14:54:28 +02:00
Martin Povišer
c05caa7557 package/python-construct: new package
construct is a Python library for declarative serialization/
deserialization of structured binary data.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-03 21:20:58 +02:00
Guillaume W. Bres
08c78cf315 support/testing/tests/test_python_scipy: add scipy::io module testing
Test the scipy::io module, to demonstrate that runtime dependencies
are correct.

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-03 18:35:54 +02:00
Guillaume W. Bres
3dceb0402a support/testing/tests/package/test_python_scipy: relax timeout value
Importing the scipy module in the Python interpreter running in Qemu
takes quite a while on slow machine, so a timeout extension to 30
seconds is needed to make sure the test has the time to run.

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-03 18:34:17 +02:00
James Hilliard
d21d3900bf package/python-rtoml: new package
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-02 23:19:08 +02:00
Ricardo Martincoski
32e9f1813c support/testing/tests: improve get-developers test
Change the test into a characterization test for all warnings and errors
get-developers can return when parsing the DEVELOPERS files.

It will be helpful when changing the behavior of get-developers to bail
out on all syntax checking warnings.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-01 22:57:19 +02:00
Julien Olivain
3a520c64f6 support/testing: add test for ola
This test relies on the OLA Dummy plugin presenting a test device
and port.  It starts the daemon, performs few configuration commands,
covers the Python bindings and also test the OLA web interface.

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-01 21:58:49 +02:00
Jagan Teki
e10431db29 package/python-scipy: new package
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
[Arnout:
 - Indent hash file with two spaces.
 - Bump to 1.7.3 to fix build failure with recent GCC.
 - Get from github instead of PyPI.
 - Add host-meson and host-python-pythran dependencies.
 - Properly propagate Config.in dependencies.
 - Correct usage of BR2_INSTALL_LIBSTDCPP symbol.
 - Remove F77, no longer used.
]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Guillaume:
 - -lnpymath: npymath.ini localization problem
 - -lnpyrandom resolution problem
 - fix legal-info for latest version LICENSE.txt
 - zlib is a scipy::io module runtime requirement
 - update serie for scipy 1.8.1 (latest)
]
Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
[Thomas:
 - add runtime test
 - drop dependency on OpenBLAS, which is not needed in a minimal
   configuration
 - remove PYTHON_SCIPY_NPY_PKG_CONFIG_PATH logic as it is no longer
   needed
]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-01 19:30:42 +02:00
Julien Olivain
8c074e73b0 support/testing: add test for python-pyalsa
This is a simple test importing pyalsa, showing alsa library version and
attempting to list cards.

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-28 23:12:28 +02:00
Thomas Petazzoni
ebe5d9edfe boot, package, support, toolchain: switch to 2 spaces for the hash file
It's time to finally switch over globally to the new spacing format
that we have agreed on for the hash file, with 2 spaces as a separator
between fields.

This commit was mechanically generated using:

find . -type f -name '*.hash' | xargs sed -i 's%^md5[ \t]*\([^ \t]*\)[ \t]*\(.*\)$%md5  \1  \2%'
find . -type f -name '*.hash' | xargs sed -i 's%^sha1[ \t]*\([^ \t]*\)[ \t]*\(.*\)$%sha1  \1  \2%'
find . -type f -name '*.hash' | xargs sed -i 's%^sha256[ \t]*\([^ \t]*\)[ \t]*\(.*\)$%sha256  \1  \2%'
find . -type f -name '*.hash' | xargs sed -i 's%^sha512[ \t]*\([^ \t]*\)[ \t]*\(.*\)$%sha512  \1  \2%'

This commit can easily be backported on the LTS branch by re-running
the same commands, if needed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-28 23:05:23 +02:00
Yann E. MORIN
50e398e2d9 support/run-test: add test for systemd using dbus-broker
Add four new tests for systemd (rw and ro in each case):
  - use dbus-broker instead of the original dbus
  - use the original dbus, with dbus-broker installed

The first two extend the existing IfUpDown test cases by just enabling
dbus-broker; the second ones extend this further, by explicitly enabling
the original dbus.

For one of the tests, we overload the test_run() function to test that
the dbus-broker daemon is indeed running as root. We need not replicate
that check in the other dbus-broker-only test, and it does not make
sense to test that in tests that have the original dbus enabled.

Presence of the original dbus and dbus-broker on the same system is
valid: the original dbus is used as the default system bus daemon. We do
not test switching between the two at runtime, though as this is really
too corner-case specific. We just test to ensure the original dbus
system bus daemon is not impacted by the presence of dbus-broker.

Note: the 'full' test-case enables all systemd options, and some of them
do pull the original dbus package, so we can't use that to test the
integration of dbus-broker; instead, we extend the ifupdown case, which
does not enable the original dbus.

The default external toolchain for cortex-A9 is the old ARM toolchain
which has kernel headers 4.10 Since dbus-broker needs toolchain headers
>= 4.17, it can't be selected with this toolchain. Switch the systemd
tests to the Bootlin toolchains instead. We switch all of them to make
things easier. Note that we will need to take care in the future that
the headers version used in the bootlin toolchain doesn't get bigger
than the kernel that is used. The kernel is currently 5.10, the headers
in the bleeding edge bootlin toolchain are 5.4.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-07-28 00:48:54 +02:00
Arnout Vandecappelle (Essensium/Mind)
86d32208b6 support/testing/tests/init/test_systemd.py: use downloaded kernel
Since systemd requires a relatively new kernel, we switched to a
self-built 4.19.204 kernel. However, since then, the downloaded kernel
used by the tests has been updated to 5.10, which is certainly recent
enough to support systemd. Switch to this one. This reduces the test
time significantly.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-07-27 18:30:11 +02:00
Arnout Vandecappelle (Essensium/Mind)
8dce595a68 support/testing/run-tests: fix --testcases option
The --testcases option of run-tests says how many test cases to build in
parallel. It automatically derives a jlevel from it by dividing the
number of cores + 1 by the number of parallel testcases. However, this
will typically result in a fractional number. Make doesn't like
fractional numbers as argument to -j.

Convert the number to integer (rounding down).

* br2_jlevel is an int, as multiprocessing.cpu_count() is an int, so it
  will be always >=2  (cpu_count() raises an error if it can't determine
  the number of CPU, so it will always return at least 1);

* args.testcases is an int, and is checked to be >=1

So br2_jlevel + args.testcases is guaranteed to always be bigger
than or equal to args.testcases, and the division thus bigger than 1.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[yann.morin.1998@free.fr:
  - ensure division provide at least 1
  - drop the test below
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-07-27 18:20:44 +02:00
Yann E. MORIN
78727d83e6 support/testsuite: de-duplicate the systemd runtime tests
The first three lines of all systemd runtime tests are identical, and
they already call into a common function. Therefore, move those lines
into the common function as well.

We need to pass an additional argument for the rootfs type. This changes
the signature, which could create confustion with
InitSystemBase.check_init() that has a different signature. Therefore,
rename the function to check_systemd(). That also allows us to call
self.check_init() directly instead of going through super().

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-07-27 17:03:25 +02:00
Arnout Vandecappelle (Essensium/Mind)
1702ddd20c support/testing/tests/toolchain/test_aarch64_64k.py: fix flake8 errors
support/testing/tests/toolchain/test_aarch64_64k.py:35:5: E303 too many blank lines (2)
support/testing/tests/toolchain/test_aarch64_64k.py:40:65: W605 invalid escape sequence '\('
support/testing/tests/toolchain/test_aarch64_64k.py:45:1: E302 expected 2 blank lines, found 1
support/testing/tests/toolchain/test_aarch64_64k.py:52:1: E302 expected 2 blank lines, found 1
support/testing/tests/toolchain/test_aarch64_64k.py:59:1: E302 expected 2 blank lines, found 1
support/testing/tests/toolchain/test_aarch64_64k.py:65:1: W391 blank line at end of file

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-07-27 10:30:37 +02:00
Thomas Petazzoni
dcb74db89e arch: add support for configurable page size on ARM64
This commit is based on earlier work from Łukasz Stelmach
<l.stelmach@samsung.com> to add support for different page sizes on
ARM64.

In his initial submission, Łukasz took an approach similar to this
one, i.e make it ARM64-specific. Following the feedback on the mailing
list, his second version [1] tried to generalize the logic to
configure the page size between architectures. But the general
consensus during the review process was that there wasn't much to
generalize in the end.

So, this new iteration is back to a simpler approach:

 * We have new options in Config.in.arm to configure the page
   size. Only 4 KB and 64 KB are supported, because our testing in
   Qemu and real hardware has not allowed to get a successful setup
   for 16 KB pages. We can always re-add support for 16 KB later if
   that is resolved.

 * The logic to define the ARCH_TOOLCHAIN_WRAPPER_OPTS options is
   moved from the ARC-specific file to arch/arch.mk, and extended to
   cover ARM64.

 * The appropriate logic in uclibc.mk and linux.mk is added to tweak
   the relevant configuration options.

 * A test case is added in the runtime test infrastructure to test
   building and booting under Qemu a 64 KB configuration, with all 3 C
   libraries.

For the regular configuration of 4 KB pages, this commit makes one
functional change: on ARM64, -Wl,-z,max-page-size=4096 is now passed in
the compiler flags of the wrapper.

[1] https://patchwork.ozlabs.org/project/buildroot/list/?series=275452

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-07-26 22:54:39 +02:00
José Pekkarinen
ef321ff4a9 package/avocado: new package
Signed-off-by: José Pekkarinen <jose.pekkarinen@unikie.com>
[Thomas: add test case, add missing dependencies]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-26 10:07:52 +02:00
Yann E. MORIN
d9ff62c4cd pacakge: drop remnants of $(HOST_DIR)/usr
It's been ages (5 years at the next release) that we've not installed
host packages in $(HOST_DIR)/usr, but we still have a few packages that
reference it or install things in there.

Drop all of those in one fell swoop.

The run-time test still succeeds, and the following defconfig, which
should exercise all touched packages [*], does build:

    BR2_x86_i686=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_INIT_NONE=y
    BR2_SYSTEM_BIN_SH_NONE=y
    # BR2_PACKAGE_BUSYBOX is not set
    BR2_PACKAGE_GAWK=y
    BR2_PACKAGE_GETTEXT=y
    BR2_PACKAGE_ABOOTIMG=y
    BR2_PACKAGE_DBUS_PYTHON=y
    BR2_PACKAGE_OLA=y
    BR2_PACKAGE_JIMTCL=y
    BR2_PACKAGE_LUA=y
    # BR2_PACKAGE_LUA_32BITS is not set
    BR2_PACKAGE_ARGPARSE=y
    BR2_PACKAGE_PERL=y
    BR2_PACKAGE_PHP=y
    BR2_PACKAGE_PHP_APCU=y
    BR2_PACKAGE_PHP_LUA=y
    BR2_PACKAGE_PHP_PAM=y
    BR2_PACKAGE_PHP_PECL_DBUS=y
    BR2_PACKAGE_PYTHON3=y
    BR2_PACKAGE_PYTHON_CRYPTOGRAPHY=y
    BR2_PACKAGE_PYTHON_PLY=y
    BR2_PACKAGE_PYTHON_PYBIND=y
    BR2_PACKAGE_LIBVA=y
    BR2_PACKAGE_BIND=y
    BR2_PACKAGE_BIND_SERVER=y
    BR2_PACKAGE_BIND_TOOLS=y
    BR2_PACKAGE_APPARMOR=y
    BR2_PACKAGE_APPARMOR_BINUTILS=y
    BR2_PACKAGE_APPARMOR_UTILS=y
    BR2_PACKAGE_APPARMOR_UTILS_EXTRA=y
    BR2_PACKAGE_APPARMOR_PROFILES=y
    BR2_PACKAGE_REFPOLICY=y
    BR2_PACKAGE_URANDOM_SCRIPTS=y
    BR2_PACKAGE_BASH=y
    # embiggen-disk to exercise go
    BR2_PACKAGE_EMBIGGEN_DISK=y
    BR2_TARGET_GRUB2=y
    BR2_TARGET_GRUB2_I386_PC=y
    BR2_TARGET_GRUB2_I386_EFI=y

[*] exceptions:
  - zfs was not tested: it needs a kernel to be built;
  - compiler-rt was not tsted: it needs llvm to be built, that takes
    ages, and other packages already reference the correct location for
    llvm-config, so it was assumed that is OK.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Cc: Anisse Astier <anisse@astier.eu>
Cc: Antoine Tenart <atenart@kernel.org>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Asaf Kahlon <asafka7@gmail.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Cc: Christian Stewart <christian@paral.in>
Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: Francois Perrad <francois.perrad@gadz.org>
Cc: Guillaume William Brs <guillaume.bressaix@gmail.com>
Cc: Hervé Codina <herve.codina@bootlin.com>
Cc: James Hilliard <james.hilliard1@gmail.com>
Cc: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Cc: Julien Boibessot <julien.boibessot@armadeus.com>
Cc: Julien Olivain <ju.o@free.fr>
Cc: Matt Weber <matthew.weber@collins.com>
Cc: Nicolas Carrier <nicolas.carrier@orolia.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Vadim Kochan <vadim4j@gmail.com>
Cc: Yegor Yefremov <yegorslists@googlemail.com>
Reviewed-by: Romain Naour <romain.naour@smile.fr>

---
Changes v1 -> v2:
  - fix new instance that have crept in  (Romain)
2022-07-24 11:30:40 +02:00
Thomas Petazzoni
7dcd979098 support/testing/tests/boot: new test cases for Grub
This commit adds four test cases for Grub:

 - Grub i386 legacy BIOS
 - Grub i386 UEFI
 - Grub x86-64 UEFI
 - Grub AArch64 UEFI

There is some overlap with the ISO9660 filesystem test cases, some of
which use Grub, but we found it relevant to have separate test cases
for Grub, which were useful to test Grub in non-ISO9660 situations.

The Grub ARM UEFI case is not tested, as it requires Grub to be
chain-loaded by U-Boot. Implementing this test case is left as an
exercise for the reader.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr:
  - use EDK2 to build the OVMF blurbs from source, instead of the
    binary blobs
  - add host-dosfstools
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-07-23 19:04:41 +02:00
Yann E. MORIN
32fb25423b support/testing: introduce py-only and py-pyc tests
Our current python3 builds only tests the pyc-only case, so add two new
tests, one for py-only and one for py+pyc. For orthogonality, rename the
current test.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Vincent Fazio <vfazio@xes-inc.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-07-23 17:23:57 +02:00
Yann E. MORIN
caaa56c99f support/testing: drop legacy python2 code
Now that we only have python3, we will never have to test a
python2-based build, so we can drop python2 compatibility
cruft.

In python3, print already is a function, we don't need to
import it from the future.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-07-23 17:23:57 +02:00
Ricardo Martincoski
9bb647297a support/testing/tests: add get-developers tests
Add a runtime test in order to detect undesired changes in behavior of
the get-developers script.

The test uses a .patch file generated against the buildroot tree as a
fixture to check how get-developers operates when called to check it.
The test also overrides the DEVELOPERS file in order to be fully
reproducible and a -d option is added to get-developers in order to
allow this. Since get-developers only looks to already committed
files to compare against patch files, the fixture uses a package that
is very unlikely to be removed from buildroot tree: binutils.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
[Thomas: extracted from a larger patch from Ricardo, submitted at
https://patchwork.ozlabs.org/project/buildroot/patch/20220528014832.289907-1-ricardo.martincoski@gmail.com/]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-23 16:32:59 +02:00
Raphaël Mélotte
dfa0c8e3a8 support/testing: add new test for python-jmespath
Add a new rudimentary test inspired by the examples from jmespath's
README file ([1]).

[1]: https://github.com/jmespath/jmespath.py/blob/develop/README.rst

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
[Thomas: add entry in DEVELOPERS file]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-22 23:18:59 +02:00
Raphaël Mélotte
c15734e3d2 support/testing: add new test for python-s3transfer
Many actual tests require network usage, so just import the module to
check that at least that part works.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-22 22:52:03 +02:00
Vincent Stehlé
98ecdd1d11 package/zerofree: new package
zerofree is a utility which scans the free blocks in an ext2 filesystem
and fills any non-zero blocks with zeroes.

https://frippery.org/uml/

The ext2fs/ext2fs.h header guards the inclusion of <sys/types.h> behind
HAVE_SYS_TYPES_H, which is an autotools-defined macro that is only
supposed to be defined by the package itself, i.e. e2fsprogs, and that
should not leak into installed headers. However, e2fsprogs does leak it,
so we work it around, liek gentoo does.

Tested-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr:
  - fix MMU dependency for comment; reword comment
  - fix multi-line assignment of ZEROFREE_CFLAGS
  - do not add comment trailing after assignment
  - extend commit log to explain why we need the workaround
  - use TARGET_CONFIGURE_OPTS, drop explicit CC=
  - install to explicit destination file
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-07-17 14:05:54 +02:00
Vincent Stehlé
019d4b312d support/testing: add test for msr-tools
Add a simple test to verify that msr-tools are working.

The test needs to build a custom x86_64 kernel with support for CPUID and
MSR.

As the TSC_AUX MSR is emulated on qemu we can use it to test that a value
written with wrmsr can indeed be read back with rdmsr.

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-07-16 23:48:25 +02:00
Vincent Stehlé
49fde7057e support/testing: add test for pixz
Add a simple compress-uncompress test to verify that pixz is working.

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-07-16 23:44:04 +02:00
Matt Weber
570aa42559 testing/tests: CLANG compiler-rt runtime test
This patch adds a test case that
 1) Builds the complete LLVM and CLANG set of host tools
 2) Cross-compiles the compiler-rt runtime using CLANG
 3) Builds a cross-compiled application using CLANG and the libfuzzer
    compiler-rt library.
 4) Executes the fuzz application (part of the libfuzzer package) on
    target and checks expected output for a heap-buffer-overflow.

Note: The libfuzzer package is just a tutorial example of how to use
      the toolkit provided by llvm (Thus not adding it as a full
      Buildroot package).

Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Romain Naour <romain.naour@smile.fr>
[Arnout: add Matt to DEVELOPERS]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-06-20 21:32:43 +02:00
Thomas Petazzoni
df13e24c9f support/testing, toolchain/toolchain-external/toolchain-external-bootlin: regenerate with ARMv7 big endian toolchain
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-06-14 17:28:30 +02:00
Thomas Petazzoni
f55b660f9b support/testing, toolchain/toolchain-external/toolchain-external-bootlin: regenerate with latest gen-bootlin-toolchains script
This commit allows to get a proper description of the dependencies for
the RISC-V 64-bit toolchain, that includes the BR2_USE_MMU dependency.

Fixes:

  http://autobuild.buildroot.net/results/d6aee9b275b1ec399aea59758ac8f69fdc5691fc/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-06-14 16:49:25 +02:00
Romain Naour
3613c3cb33 support/testing: test_oci: update to _OCI_CMD option
BR2_TARGET_ROOTFS_OCI_ENTRYPOINT_ARGS option has been
replaced by BR2_TARGET_ROOTFS_OCI_CMD in commit [1].

Since BR2_TARGET_ROOTFS_OCI_ENTRYPOINT_ARGS contains
only one item, we can safely replace by
BR2_TARGET_ROOTFS_OCI_CMD in the defconfig fragment
used by the test_oci test case.

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

[1] 08d65d81d8

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Yann E. MORIN <yann.morin@orange.com>
Cc: Sergio Prado <sergio.prado@e-labworks.com>
Cc: Matthew Weber <matthew.weber@collins.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-05-29 22:29:41 +02:00
Romain Naour
5468cf1095 package/python-avro: fix capitalizations of Parse
python-avro 1.11.0 deprecated schema.Parse [1] and actually error
out when used.

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

[1] 3e79dfec84

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-05-17 22:50:33 +02:00
Linus Kaschulla
001e0aab23 fs/squashfs: needs more test cases
For the new patch, adding block size options (commit 555f8dfd),
Yann E. MORIN requested updated testcases that specifically ensure
the extreme blocksizes (4K and 1024K) don't cause issues.

This patch splits the current test case in 2, testing with both
block sizes and ensuring the block size was applied in the same
fashion as for the specified compression.

Signed-off-by: Linus Kaschulla <linus@cosmos-ink.net>
[yann.morin.1998@free.fr: keep exisitng test with default size]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-05-17 22:40:45 +02:00
Romain Naour
447e6f0811 support/testing: test_zfs: add missing libelf dependency
While building the kernel tools, libelf header is missing:

output/TestZfsGlibc/build/linux-5.15.35/tools/objtool/include/objtool/elf.h:10:10: fatal error: gelf.h: No such file or directory
   10 | #include <gelf.h>

Select BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF to build host-libelf.

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

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-05-14 11:44:48 +02:00
Romain Naour
e66cac7631 support/testing: test_zfs: don't run TestZfsBase as a test
The commit [1] introcuded TestZfsBase as a common function
between all Zfs tests. But TestZfsBase test is executed
as a test itself.

Rename test_run() to base_test_run() to avoid this issue.

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

[1] 593e8cb71f

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-05-14 11:44:48 +02:00
Romain Naour
ca135c9939 support/testing: test_lxc: bump kernel version to 5.15.38 for complete pidfds support
As reported by [1], the lxc test is broken since lxc >= 4.0.11.
A patch was added to lxc 4.0.11 to use the new mount api for devpts
setup [2] but the fall back code doesn't work when this new mount
API is not supported. This API was added in kernel 5.6.

(kernel 5.5)
DEBUG conf - conf.c:lxc_setup_devpts_child:1682 - No new devpts instance will be
mounted since no pts devices are required
lxc-start lxc_iperf3  DEBUG conf - conf.c:lxc_setup_dev_console:1966 - Cleared
all (0) mounts from "/dev/console"
lxc-start lxc_iperf3  ERROR mount_utils - mount_utils.c:mount_at:661 - No such
file or directory - Failed to mount "/proc/self/fd/44" to "/proc/self/fd/43"
lxc-start lxc_iperf3  ERROR conf - conf.c:lxc_setup_dev_console:1988 - No such
file or directory - Failed to mount "10(/dev/pts/0)" on "43"
lxc-start lxc_iperf3  ERROR conf - conf.c:lxc_setup_console:2143 - No such file
or directory - Failed to setup console

(kernel 5.6)
lxc-start lxc_iperf3  TRACE mount_utils - mount_utils.c:can_use_mount_api:582 -
Kernel supports mount api
lxc-start lxc_iperf3  TRACE mount_utils - mount_utils.c:move_detached_mount:328
- Attach detached mount 45 to filesystem at 43
lxc-start lxc_iperf3  TRACE conf - conf.c:lxc_setup_dev_console:1990 - Setup
console "/dev/pts/0"

Bump the kernel to the current LTS 5.15.38 version that fully support the
mount API needed by lxc.

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

[1] http://lists.busybox.net/pipermail/buildroot/2022-January/635251.html
[2] be606e16fd

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-05-13 21:08:30 +02:00
Arnout Vandecappelle (Essensium/Mind)
1264dd50ef support/testing/tests/package/test_octave.py: fix flake8 error
Fixes:
support/testing/tests/package/test_octave.py:46:31: W605 invalid escape sequence '\ '

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-05-04 22:01:44 +02:00
José Luis Salvador Rufo
49f9a08223 package/zfs: add test case for musl toolchain
Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-05-03 22:33:47 +02:00
José Luis Salvador Rufo
593e8cb71f package/zfs: refactor test cases
Add TestZfsBase that contains the common parts of the test.

Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-05-03 22:32:15 +02:00
Julien Olivain
40ea68b4b2 package/octave: new package
GNU Octave is a high-level language, primarily intended for numerical
computations. It provides a convenient command line interface for
solving linear and nonlinear problems numerically, and for performing
other numerical experiments using a language that is mostly compatible
with Matlab. It may also be used as a batch-oriented language. Octave
has extensive tools for solving common numerical linear algebra
problems, finding the roots of nonlinear equations, integrating
ordinary functions, manipulating polynomials, and integrating ordinary
differential and differential-algebraic equations. It is easily
extensible and customizable via user-defined functions written in
Octave's own language, or using dynamically loaded modules written in
C++, C, Fortran, or other languages.

https://www.octave.org/

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-05-03 22:04:36 +02:00
José Luis Salvador Rufo
68dfd09708 package/zfs: bump version to 2.1.4
Removed 0001-Correct-a-flaw-in-the-Python-3-version-checking.patch
because is already merged.

Select libcurl as required dependency, because keylocation now
supports https. OpenSSL was already a dependency, so libcurl will be
built with https support.

Add upstream patch to support uClibc.

We update the test cases to use the latest LTS kernel, 5.15.x.

Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-04-25 22:16:45 +02:00
Arnout Vandecappelle (Essensium/Mind)
12588a667a support/testing: test_rust.py: fix flake8 errors
Fix flake8 errors introduced in commit f0d1f21195

Fixes:
support/testing/tests/package/test_rust.py:2:1: F401 'tempfile' imported but unused
support/testing/tests/package/test_rust.py:3:1: F401 'subprocess' imported but unused
support/testing/tests/package/test_rust.py:4:1: F401 'shutil' imported but unused
support/testing/tests/package/test_rust.py:18:1: E302 expected 2 blank lines, found 1
2022-03-15 22:10:01 +01:00
Romain Naour
f0d1f21195 support/testing: TestRust{Bin} use ripgrep package for testing
TestRust and TestRustBin has been introduced at the time when there was
no cargo package infrastructure or any package using rust compiler
(Buildroot 2018.02).

Since then the ripgrep package has been introduced, initially using
the generic package infrastructure and converted later to the cargo
package infrastructure.

Due a recent change in rust/cargo removing the cargo config file [1]
the test TestRust and TestRustBin now fail to compile since they build
an hello-world crate outside of the cargo package infrastructure
without the correct environment for cross-compiling.

Replace the 'hello-world' crate by ripgrep package and check if it
can run properly in Qemu.

Fixes tests.package.test_rust.TestRustBin:
https://gitlab.com/buildroot.org/buildroot/-/jobs/2116202545

But doesn't fixes tests.package.test_rust.TestRust due another bug:
https://gitlab.com/buildroot.org/buildroot/-/jobs/2116202544

[1] b6378631c2

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-03-14 13:17:40 +01:00
Romain Naour
6245121613 toolchain/toolchain-external/toolchain-external-bootlin: update with new s390x toolchain
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-03-10 22:09:26 +01:00
Peter Korsgaard
a83177aac6 support/testing/../sample_python_pyyaml_dec.py: unbreak after move to pyaml 6.0
Fixes https://gitlab.com/buildroot.org/buildroot/-/jobs/2088684091

python sample_python_pyyaml_dec.py
Traceback (most recent call last):
  File "/root/sample_python_pyyaml_dec.py", line 5, in <module>
    data = yaml.load(serialized)
TypeError: load() missing 1 required positional argument: 'Loader'

yaml.load() requires a loader argument since the move to version 6.0:
https://github.com/yaml/pyyaml/pull/561

The test does not need the extra functionality of load(), so instead move to
the recommended safe_load().

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Tested-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-02-21 21:56:34 +01:00
Julien Olivain
ebde11d29f support/testing: add test for python-distro
This commit add a simple test checking the reported distro name and
id are Buildroot (as reported by /etc/os-release).

Signed-off-by: Julien Olivain <ju.o@free.fr>
[Arnout: drop python2 variant]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-02-12 13:55:52 +01:00
Peter Korsgaard
f697096a77 support/testing: drop python2 tests
Python2 for the target is about to get removed, so drop the tests using it.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-02-09 22:07:33 +01:00