[Buildroot] [PATCH 1/1] support/testing/infra/basetest.py: use Bootlin toolchain bleeding edge 2022.08-1

Sebastian Weyer sebastian.weyer at smile.fr
Thu Mar 30 11:27:49 UTC 2023


This patch updates the default toolchain used for runtime tests. The
last time this toolchain was updated was in commit
0207a65323fc73fe9570f3d7e03bbfed4ab6d477 3 years ago. Since then,
multiple things have changed:

Firstly, it used uclibc-ng as the libc whereas since commit
4057e36ca9665edd5248512e4edba2c243b8f4be, glibc is used as the default
library.

And secondly, since commit 531b2a10cda6bae78ecc141c9fe48f2024f71dbc, buildroot
dropped the support for gcc 8 and it cannot be built internally anymore.

This new toolchain bleeding edge 2022.08-1 is based on gcc 12.2.0, linux
headers 5.4.212, glibc 2.35 and binutils 2.39.
It is now required to add enable BR2_TOOLCHAIN_USES_GLIBC and
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC since uclibc-ng is still the
standard choice when using an external toolchain. If one were to change
this, it would break the builds for people using a uclibc toolchain with
a recent version of buildroot. BR2_TOOLCHAIN_EXTERNAL_LOCALE doesn't
need to be enabled anymore since it is implicit in glibc.
BR2_TOOLCHAIN_EXTERNAL_INET_RPC needs to be disabled since support has
been dropped by glibc but it is selected by default when choosing glibc.

The previous toolchain bleeding edge 2018.11-1 is based on gcc 8.2.0,
linux headers 4.14.80, uclibc 1.0.30 and binutils 2.31.1

Tested with gitlab:
https://gitlab.com/DocSepp/buildroot/-/pipelines/821745386/

Due to gitlab constraints it's not possible to check all the tests. Most
of the tests that did not succeed didn't because of such constraints.
The remaining fails are missing python or perl modules, timeouts because
the test takes more than 3h, tests.package.test_kexec.TestKexec  is
executed with a property that is unknown to qemu and several tests use a
different toolchain.

I noticed 4 tests, TestPython3Py, TestPython3Pyc, TestPython3PyPyc and
TestTmux that failed due to locale and libc.so.1 not found errors. I
verified that they did run with the previous toolchain and subsequently
introduced changes in their configs so the tests succeed with the new
toolchain.

Signed-off-by: Sebastian Weyer <sebastian.weyer at smile.fr>
---
 support/testing/infra/basetest.py            | 10 ++++++----
 support/testing/tests/package/test_python.py |  2 +-
 support/testing/tests/package/test_tmux.py   |  1 +
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
index 670c7213d6..586b51e56e 100644
--- a/support/testing/infra/basetest.py
+++ b/support/testing/infra/basetest.py
@@ -10,13 +10,15 @@ BASIC_TOOLCHAIN_CONFIG = \
     BR2_arm=y
     BR2_TOOLCHAIN_EXTERNAL=y
     BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
+    BR2_TOOLCHAIN_USES_GLIBC=y
+    BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
     BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
-    BR2_TOOLCHAIN_EXTERNAL_URL="https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs/armv5-eabi--uclibc--bleeding-edge-2018.11-1.tar.bz2"
-    BR2_TOOLCHAIN_EXTERNAL_GCC_8=y
-    BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y
-    BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
+    BR2_TOOLCHAIN_EXTERNAL_URL="https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs/armv5-eabi--glibc--bleeding-edge-2022.08-1.tar.bz2"
+    BR2_TOOLCHAIN_EXTERNAL_GCC_12=y
+    BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_4=y
     BR2_TOOLCHAIN_HAS_THREADS_DEBUG=y
     BR2_TOOLCHAIN_EXTERNAL_CXX=y
+    # BR2_TOOLCHAIN_EXTERNAL_INET_RPC is not set
     """
 
 MINIMAL_CONFIG = \
diff --git a/support/testing/tests/package/test_python.py b/support/testing/tests/package/test_python.py
index d6f69a83c7..c9ecf9acda 100644
--- a/support/testing/tests/package/test_python.py
+++ b/support/testing/tests/package/test_python.py
@@ -29,7 +29,7 @@ class TestPythonBase(infra.basetest.BRTest):
     def libc_time_test(self, timeout=-1):
         cmd = self.interpreter + " -c '"
         cmd += "import ctypes;"
-        cmd += "libc = ctypes.cdll.LoadLibrary(\"libc.so.1\");"
+        cmd += "libc = ctypes.cdll.LoadLibrary(\"libc.so.6\");"
         cmd += "print(libc.time(None))'"
         self.assertRunOk(cmd, timeout)
 
diff --git a/support/testing/tests/package/test_tmux.py b/support/testing/tests/package/test_tmux.py
index 7a10b7a2b0..f2c620d5ca 100644
--- a/support/testing/tests/package/test_tmux.py
+++ b/support/testing/tests/package/test_tmux.py
@@ -9,6 +9,7 @@ class TestTmux(infra.basetest.BRTest):
         BR2_PACKAGE_TMUX=y
         BR2_TARGET_ROOTFS_CPIO=y
         # BR2_TARGET_ROOTFS_TAR is not set
+        BR2_GENERATE_LOCALE="C.UTF-8"
         """
 
     def test_run(self):
-- 
2.25.1




More information about the buildroot mailing list