f89f52168f
This patch updates the default toolchain used for runtime tests. The last time this toolchain was updated was in commit0207a65323
3 years ago. Since then, multiple things have changed: Firstly, it used uclibc-ng as the libc whereas since commit4057e36ca9
, glibc is used as the default library. And secondly, since commit531b2a10cd
, 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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
64 lines
1.7 KiB
Python
64 lines
1.7 KiB
Python
import os
|
|
|
|
import infra.basetest
|
|
|
|
|
|
class TestOpensshBase(infra.basetest.BRTest):
|
|
passwd = "testpwd"
|
|
opensshconfig = \
|
|
"""
|
|
BR2_TARGET_GENERIC_ROOT_PASSWD="{}"
|
|
BR2_PACKAGE_OPENSSH=y
|
|
BR2_PACKAGE_SSHPASS=y
|
|
BR2_ROOTFS_POST_BUILD_SCRIPT="{}"
|
|
# BR2_TARGET_ROOTFS_TAR is not set
|
|
""".format(
|
|
passwd,
|
|
infra.filepath("tests/package/test_openssh/post-build.sh"))
|
|
|
|
def openssh_test(self):
|
|
img = os.path.join(self.builddir, "images", "rootfs.cpio")
|
|
self.emulator.boot(arch="armv5",
|
|
kernel="builtin",
|
|
options=["-initrd", img,
|
|
"-net", "none"])
|
|
self.emulator.login(self.passwd)
|
|
|
|
cmd = "netstat -ltn 2>/dev/null | grep 0.0.0.0:22"
|
|
self.assertRunOk(cmd)
|
|
|
|
cmd = "sshpass -p {} ssh -oStrictHostKeyChecking=no localhost /bin/true".format(self.passwd)
|
|
self.assertRunOk(cmd)
|
|
|
|
|
|
class TestOpenSshuClibc(TestOpensshBase):
|
|
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
|
|
"""
|
|
|
|
def test_run(self):
|
|
self.openssh_test()
|
|
|
|
|
|
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
|
|
"""
|
|
|
|
def test_run(self):
|
|
self.openssh_test()
|