From patchwork Sun Mar 1 15:17:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1247331 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=h8jvMs02; dkim-atps=neutral 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 48Vn3652rsz9sSG for ; Mon, 2 Mar 2020 02:18:10 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2D39985A74; Sun, 1 Mar 2020 15:18:09 +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 q1vUczob7mQX; Sun, 1 Mar 2020 15:18:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9C5AE85A4B; Sun, 1 Mar 2020 15:18:06 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id DF9121BF2E3 for ; Sun, 1 Mar 2020 15:18:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D162486096 for ; Sun, 1 Mar 2020 15:18:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LAcwFO82nBzR for ; Sun, 1 Mar 2020 15:18:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1163A86061 for ; Sun, 1 Mar 2020 15:18:04 +0000 (UTC) Received: by mail-qk1-f180.google.com with SMTP id u124so7667662qkh.13 for ; Sun, 01 Mar 2020 07:18:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/488Rrol306ZV/y7X3z96lUYRVTSw0q0PV5h1dxv9vk=; b=h8jvMs02H6CLUdCioUeP6xdJh1oD+469mhHGZP2qsTN6Su5OSqO0nkGI/2+PHdvgtZ 9H7FY6wbtSUbnh1tsJbn2WvG4CO/psUqLDLpaNJQN7SRav8dshu+ds2+tER6kLqMBJcU /mtxHUuu9UQtHNkn9J9twhvh3556Q9SwsCEee5VZOJF3mG4PpYmeGlSShfXu48BupCY2 cJK/IfFM0IisshdUOBFOn0NSNShbZXDSDQBmISKr1oXAaVTZu2Nur8QhNnngKNSkxdKC LhvF6/HMcIZN/7ElblsPLlOlmtR1LX9pwrvLO1jo8YOICKx7hozaTylU2z1A5T9JC+Oh FQEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/488Rrol306ZV/y7X3z96lUYRVTSw0q0PV5h1dxv9vk=; b=gqzHp5r+8WlZnUjS+/OQsEP673D/9gOaWteqL+LTGaTinSlMfd+fv02p4Ic+/BMboz Wr0CpUqmmEe+0KTaNjtWfRKPJcb+3pF8q8K4canVFhsHrxBHBr/rQiHoGm8Wb9yeVoGX 6f6xX8yXkm/1p79Mk1H0Wfjz9mNMZew/czb+AT4ndgma3n5ENttG1AKyOU/eQE0ER4fl urz3jZgjXM19VkfhIKLnoFWqCcGwGND0XYz5p/izaPY+jqQYKo3tbHxO86P21ypbDifs nC3EOq9OelSQVenkIeyOu2xpjJKGKAiiyW3h+dN2SJYKgFtDBp+hJzSE1pMG0P8pLI+m Jc8g== X-Gm-Message-State: APjAAAWOr7T9SjIcMygDaFVTrQET4DOmkQDeZRVjksqrKCBEsbqp2t/D Ic7gkRwxaM9UYuAOK/5xKjW4YHBf X-Google-Smtp-Source: APXvYqzxz/jK6I4arBsWzzmzy4QoDps4kW7EWqKxM/rRWTGfSlNNPMnOBsP7NXIvlvHVyFUWfNOB1w== X-Received: by 2002:a37:4891:: with SMTP id v139mr12793035qka.172.1583075882864; Sun, 01 Mar 2020 07:18:02 -0800 (PST) Received: from casantos.remote.com (200.175.82.32.dynamic.adsl.gvt.net.br. [200.175.82.32]) by smtp.gmail.com with ESMTPSA id t37sm8866302qth.0.2020.03.01.07.18.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2020 07:18:02 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Sun, 1 Mar 2020 12:17:47 -0300 Message-Id: <20200301151747.25723-5-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200301151747.25723-1-unixmania@gmail.com> References: <20200301151747.25723-1-unixmania@gmail.com> Subject: [Buildroot] [PATCH/next v2 4/4] support/testing: add openrc tests 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: Adam Duskett , =?utf-8?b?TWljaGHFgiDFgXlzemN6ZWs=?= MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett Two simple tests to ensure that openrc boots without any services crashing with a read only and a read write filing system. Signed-off-by: Adam Duskett Signed-off-by: Carlos Santos --- .gitlab-ci.yml | 2 + support/testing/tests/init/test_openrc.py | 51 +++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 support/testing/tests/init/test_openrc.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b4dad3173e..382a7c59b2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -368,6 +368,8 @@ tests.init.test_busybox.TestInitSystemBusyboxRoNet: { extends: .runtime_test } tests.init.test_busybox.TestInitSystemBusyboxRw: { extends: .runtime_test } tests.init.test_busybox.TestInitSystemBusyboxRwNet: { extends: .runtime_test } tests.init.test_none.TestInitSystemNone: { extends: .runtime_test } +tests.init.test_openrc.TestInitSystemOpenrcRoFull: { extends: .runtime_test } +tests.init.test_openrc.TestInitSystemOpenrcRwFull: { extends: .runtime_test } tests.init.test_systemd.TestInitSystemSystemdRoFull: { extends: .runtime_test } tests.init.test_systemd.TestInitSystemSystemdRoIfupdown: { extends: .runtime_test } tests.init.test_systemd.TestInitSystemSystemdRoNetworkd: { extends: .runtime_test } diff --git a/support/testing/tests/init/test_openrc.py b/support/testing/tests/init/test_openrc.py new file mode 100644 index 0000000000..23669a9572 --- /dev/null +++ b/support/testing/tests/init/test_openrc.py @@ -0,0 +1,51 @@ +import infra.basetest +from tests.init.base import InitSystemBase as InitSystemBase + + +class InitSystemOpenrcBase(InitSystemBase): + config = \ + """ + BR2_arm=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_INIT_OPENRC=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.5.7" + BR2_LINUX_KERNEL_DEFCONFIG="vexpress" + BR2_LINUX_KERNEL_DTS_SUPPORT=y + BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9" + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def check_init(self): + super(InitSystemOpenrcBase, self) + + # Test all services are OK + output, _ = self.emulator.run("rc-status -c") + self.assertEqual(len(output), 0) + + +class TestInitSystemOpenrcRoFull(InitSystemOpenrcBase): + config = InitSystemOpenrcBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set + BR2_TARGET_ROOTFS_SQUASHFS=y + """ + + def test_run(self): + self.start_emulator("squashfs", "zImage", "vexpress-v2p-ca9") + self.check_init() + + +class TestInitSystemOpenrcRwFull(InitSystemOpenrcBase): + config = InitSystemOpenrcBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + BR2_TARGET_ROOTFS_EXT2=y + """ + + def test_run(self): + self.start_emulator("ext2", "zImage", "vexpress-v2p-ca9") + self.check_init()