Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@buildroot.org
Cc: Sebastian Weyer <sebastian.weyer@smile.fr>,
	Romain Naour <romain.naour@gmail.com>
Subject: [Buildroot] [PATCH v2 06/17] support/testing/infra/basetest.py: use Bootlin toolchain stable 2022.08-1
Date: Fri,  9 Jun 2023 01:28:48 +0200	[thread overview]
Message-ID: <20230608232859.1245497-6-romain.naour@gmail.com> (raw)
In-Reply-To: <20230608232859.1245497-1-romain.naour@gmail.com>

From: Sebastian Weyer <sebastian.weyer@smile.fr>

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.
So the testsuite was executed using a toolchain that can't be built by
the Buildroot internal toolchain backend anymore.

This new Bootlin toolchain stable 2022.08-1 is based on gcc 11.3.0,
linux headers 4.9.327, glibc 2.35 and binutils 2.38.

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

Nowadays Bootlin toolchains are packaged in Buildroot and we can
directly select them from BASIC_TOOLCHAIN_CONFIG and avoid
setting the toolchain parameters (BR2_TOOLCHAIN_EXTERNAL_CUSTOM...).

The switch to Glibc requires to update some tests for the following
reasons:

- TestPython3Py, TestPython3Pyc and TestPython3PyPyc has been updated
  since they use the libc binary file name in their test
  (uClibc: libc.so.1 vs Glibc: libc.so.6).

- TestTmux needs at least one locale to pass (as stated in tmux help
  text "tmux needs a working UTF-8 locale"), so use "C.UTF-8".

- TestOpenSsh needs a toolchain >= 5.x due to a openssh issue
  (Similar to: https://bugs.busybox.net/show_bug.cgi?id=13671)
  Use the Bootlin toolchain bleeding-edge 2022.08-1 rhat provide
  kernel headers 5.4

- TestShadow needs a toolchain >= 4.14
  Use the Bootlin toolchain bleeding-edge 2022.08-1 rhat provide
  kernel headers 5.4

Runtime tested on the gcc farm server.

Signed-off-by: Sebastian Weyer <sebastian.weyer@smile.fr>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 support/testing/infra/basetest.py             | 10 ++--------
 support/testing/tests/package/test_openssh.py |  8 +++++++-
 support/testing/tests/package/test_python.py  |  2 +-
 support/testing/tests/package/test_shadow.py  |  7 ++++++-
 support/testing/tests/package/test_tmux.py    |  1 +
 5 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
index 670c7213d6..12d96415da 100644
--- a/support/testing/infra/basetest.py
+++ b/support/testing/infra/basetest.py
@@ -9,14 +9,8 @@ BASIC_TOOLCHAIN_CONFIG = \
     """
     BR2_arm=y
     BR2_TOOLCHAIN_EXTERNAL=y
-    BR2_TOOLCHAIN_EXTERNAL_CUSTOM=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_HAS_THREADS_DEBUG=y
-    BR2_TOOLCHAIN_EXTERNAL_CXX=y
+    BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
+    BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y
     """
 
 MINIMAL_CONFIG = \
diff --git a/support/testing/tests/package/test_openssh.py b/support/testing/tests/package/test_openssh.py
index 4b48059573..a28c28f797 100644
--- a/support/testing/tests/package/test_openssh.py
+++ b/support/testing/tests/package/test_openssh.py
@@ -32,9 +32,13 @@ class TestOpensshBase(infra.basetest.BRTest):
 
 
 class TestOpenSshuClibc(TestOpensshBase):
-    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+    config = \
         TestOpensshBase.opensshconfig + \
         """
+        BR2_arm=y
+        BR2_TOOLCHAIN_EXTERNAL=y
+        BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
+        BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_UCLIBC_STABLE=y
         BR2_TARGET_ROOTFS_CPIO=y
         """
 
@@ -43,12 +47,14 @@ class TestOpenSshuClibc(TestOpensshBase):
 
 
 class TestOpenSshGlibc(TestOpensshBase):
+
     config = \
         TestOpensshBase.opensshconfig + \
         """
         BR2_arm=y
         BR2_TOOLCHAIN_EXTERNAL=y
         BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
+        BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_BLEEDING_EDGE=y
         BR2_PACKAGE_RNG_TOOLS=y
         BR2_TARGET_ROOTFS_CPIO=y
         """
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_shadow.py b/support/testing/tests/package/test_shadow.py
index 09b580de59..3352d454a5 100644
--- a/support/testing/tests/package/test_shadow.py
+++ b/support/testing/tests/package/test_shadow.py
@@ -5,9 +5,14 @@ from infra.basetest import BRTest, BASIC_TOOLCHAIN_CONFIG
 
 class TestShadow(BRTest):
     username = 'user_test'
-    config = BASIC_TOOLCHAIN_CONFIG + \
+    # Need to use a different toolchain than the default due to
+    # shadow package requiring a toolchain w/ headers >= 4.14
+    config = \
         """
         BR2_arm=y
+        BR2_TOOLCHAIN_EXTERNAL=y
+        BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
+        BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_BLEEDING_EDGE=y
         BR2_PACKAGE_SHADOW=y
         BR2_TARGET_ROOTFS_EXT2=y
         BR2_TARGET_ROOTFS_EXT2_4=y
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.34.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2023-06-08 23:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08 23:28 [Buildroot] [PATCH v2 01/17] package/python-iptables: fix _find_library() Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 02/17] support/testing: TestPythonPy3S3transfer: increase ext2 size to 250M Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 03/17] support/testing: TestPythonPy3Boto3: " Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 04/17] support/testing: TestPythonPy3Botocore: " Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 05/17] support/testing: TestSELinuxSystemd: kernel bump 6.1.26 Romain Naour
2023-06-08 23:28 ` Romain Naour [this message]
2023-06-08 23:28 ` [Buildroot] [PATCH v2 07/17] support/testing: TestMtools: use base configuration Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 08/17] support/testing: TestZ3: " Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 09/17] support/testing: Test{No, All, NonDefaultLimited}Timezone: " Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 10/17] support/testing: TestPythonPy3SciPy: use python " Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 11/17] support/testing: TestPythonPy3Autobahn: " Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 12/17] support/testing: TestPythonPy3Crossbar: " Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 13/17] support/testing: TestPythonPy3Cryptography: " Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 14/17] support/testing: TestPythonPy3MagicWormhole: " Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 15/17] support/testing: TestPythonPy3ServiceIdentity: " Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 16/17] support/testing: TestPythonPy3Treq: " Romain Naour
2023-06-08 23:28 ` [Buildroot] [PATCH v2 17/17] support/testing: TestPythonPy3Txtorcon: " Romain Naour
2023-07-12 21:24 ` [Buildroot] [PATCH v2 01/17] package/python-iptables: fix _find_library() Thomas Petazzoni via buildroot
2023-08-25 16:11 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230608232859.1245497-6-romain.naour@gmail.com \
    --to=romain.naour@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=sebastian.weyer@smile.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox