From patchwork Tue Mar 24 14:23:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1260712 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48mtmH1xWzz9sWJ for ; Wed, 25 Mar 2020 01:24:14 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E25CE854A7; Tue, 24 Mar 2020 14:24:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OWW-K9Br-FnD; Tue, 24 Mar 2020 14:24:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 77B2C851C2; Tue, 24 Mar 2020 14:24:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id C90271BF865 for ; Tue, 24 Mar 2020 14:24:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C3C9120111 for ; Tue, 24 Mar 2020 14:24:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ktz3mAsjXm6Z for ; Tue, 24 Mar 2020 14:24:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by silver.osuosl.org (Postfix) with ESMTPS id A058620130 for ; Tue, 24 Mar 2020 14:24:04 +0000 (UTC) Received: from localhost (lfbn-tou-1-915-109.w86-210.abo.wanadoo.fr [86.210.146.109]) (Authenticated sender: thomas.petazzoni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 39F1B240007; Tue, 24 Mar 2020 14:24:01 +0000 (UTC) From: Thomas Petazzoni To: buildroot@buildroot.org Date: Tue, 24 Mar 2020 15:23:56 +0100 Message-Id: <20200324142356.1487610-2-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200324142356.1487610-1-thomas.petazzoni@bootlin.com> References: <20200324142356.1487610-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] support/testing: add build tests for the syslinux bootloader X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This commit adds four new tests for the syslinux bootloader: - Building on x86, for legacy BIOS - Building on x86, for EFI BIOS - Building on x86-64, for legacy BIOS - Building on x86-64, for EFI BIOS Runtime testing in Qemu would certainly be possible, but is left as a future addition to these tests. Signed-off-by: Thomas Petazzoni --- .gitlab-ci.yml | 4 + DEVELOPERS | 1 + support/testing/tests/boot/test_syslinux.py | 83 +++++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 support/testing/tests/boot/test_syslinux.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f5ed95f5e7..b505e842ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -335,6 +335,10 @@ zynqmp_zcu106_defconfig: { extends: .defconfig } tests.boot.test_atf.TestATFAllwinner: { extends: .runtime_test } tests.boot.test_atf.TestATFMarvell: { extends: .runtime_test } tests.boot.test_atf.TestATFVexpress: { extends: .runtime_test } +tests.boot.test_syslinux.TestSysLinuxX86EFI: { extends: .runtime_test } +tests.boot.test_syslinux.TestSysLinuxX86LegacyBios: { extends: .runtime_test } +tests.boot.test_syslinux.TestSysLinuxX86_64EFI: { extends: .runtime_test } +tests.boot.test_syslinux.TestSysLinuxX86_64LegacyBios: { extends: .runtime_test } tests.core.test_file_capabilities.TestFileCapabilities: { extends: .runtime_test } tests.core.test_hardening.TestFortifyConserv: { extends: .runtime_test } tests.core.test_hardening.TestFortifyNone: { extends: .runtime_test } diff --git a/DEVELOPERS b/DEVELOPERS index 8ea08739f7..fb12347512 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2501,6 +2501,7 @@ F: package/scons/ F: package/squashfs/ F: package/wayland/ F: package/weston/ +F: support/testing/tests/boot/test_syslinux.py F: toolchain/ N: Timo Ketola diff --git a/support/testing/tests/boot/test_syslinux.py b/support/testing/tests/boot/test_syslinux.py new file mode 100644 index 0000000000..6b1a8bc7d7 --- /dev/null +++ b/support/testing/tests/boot/test_syslinux.py @@ -0,0 +1,83 @@ +import infra.basetest + +class TestSysLinuxBase(infra.basetest.BRTest): + x86_toolchain_config = \ + """ + BR2_x86_i686=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y + BR2_TOOLCHAIN_EXTERNAL_URL="http://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs/x86-i686--glibc--bleeding-edge-2018.11-1.tar.bz2" + BR2_TOOLCHAIN_EXTERNAL_GCC_8=y + BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y + BR2_TOOLCHAIN_EXTERNAL_CXX=y + """ + + x86_64_toolchain_config = \ + """ + BR2_x86_64=y + BR2_x86_corei7=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y + BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y + BR2_TOOLCHAIN_EXTERNAL_URL="http://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs/x86-64-core-i7--glibc--stable-2018.11-1.tar.bz2" + BR2_TOOLCHAIN_EXTERNAL_GCC_7=y + BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1=y + # BR2_TOOLCHAIN_EXTERNAL_LOCALE is not set + BR2_TOOLCHAIN_EXTERNAL_CXX=y + BR2_TOOLCHAIN_EXTERNAL_HAS_SSP=y + BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG=y + BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS=y + BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y + """ + + syslinux_legacy_config = \ + """ + BR2_TARGET_SYSLINUX=y + BR2_TARGET_SYSLINUX_ISOLINUX=y + BR2_TARGET_SYSLINUX_PXELINUX=y + BR2_TARGET_SYSLINUX_MBR=y + """ + + syslinux_efi_config = \ + """ + BR2_TARGET_SYSLINUX=y + BR2_TARGET_SYSLINUX_EFI=y + """ + +class TestSysLinuxX86LegacyBios(TestSysLinuxBase): + config = \ + TestSysLinuxBase.x86_toolchain_config + \ + infra.basetest.MINIMAL_CONFIG + \ + TestSysLinuxBase.syslinux_legacy_config + + def test_run(self): + pass + +class TestSysLinuxX86EFI(TestSysLinuxBase): + config = \ + TestSysLinuxBase.x86_toolchain_config + \ + infra.basetest.MINIMAL_CONFIG + \ + TestSysLinuxBase.syslinux_efi_config + + def test_run(self): + pass + +class TestSysLinuxX86_64LegacyBios(TestSysLinuxBase): + config = \ + TestSysLinuxBase.x86_64_toolchain_config + \ + infra.basetest.MINIMAL_CONFIG + \ + TestSysLinuxBase.syslinux_legacy_config + + def test_run(self): + pass + +class TestSysLinuxX86_64EFI(TestSysLinuxBase): + config = \ + TestSysLinuxBase.x86_64_toolchain_config + \ + infra.basetest.MINIMAL_CONFIG + \ + TestSysLinuxBase.syslinux_efi_config + + def test_run(self): + pass