From: Norbert Lange <nolange79@gmail.com>
To: buildroot@buildroot.org
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Subject: [Buildroot] [PATCH v6 3/4] support/testsuite: de-duplicate the systemd runtime tests
Date: Sun, 9 Jan 2022 23:16:49 +0100 [thread overview]
Message-ID: <20220109221650.777610-3-nolange79@gmail.com> (raw)
In-Reply-To: <20220109221650.777610-1-nolange79@gmail.com>
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Of all the systemd init tests, only one does some additional tests, and
for just this lone wolf, we duplicate the test function.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
support/testing/tests/init/test_systemd.py | 32 ++++++++--------------
1 file changed, 12 insertions(+), 20 deletions(-)
diff --git a/support/testing/tests/init/test_systemd.py b/support/testing/tests/init/test_systemd.py
index f0cc52bac8..80c6776f59 100644
--- a/support/testing/tests/init/test_systemd.py
+++ b/support/testing/tests/init/test_systemd.py
@@ -21,8 +21,9 @@ class InitSystemSystemdBase(InitSystemBase):
# BR2_TARGET_ROOTFS_TAR is not set
""".format(infra.filepath("conf/binfmt-misc-kernel-fragment.config"))
- def check_init(self):
- super(InitSystemSystemdBase, self).check_init("/lib/systemd/systemd")
+ def check_systemd(self, fs):
+ self.start_emulator(fs, "zImage", "vexpress-v2p-ca9")
+ self.check_init("/lib/systemd/systemd")
# Test all units are OK
output, _ = self.emulator.run("systemctl --no-pager --failed --no-legend")
@@ -35,6 +36,9 @@ class InitSystemSystemdBase(InitSystemBase):
output, _ = self.emulator.run("journalctl --no-pager --lines 1 --quiet")
self.assertEqual(len(output), 1)
+ # Check the network is up
+ self.check_network("eth0")
+
class TestInitSystemSystemdRoNetworkd(InitSystemSystemdBase):
config = InitSystemSystemdBase.config + \
@@ -46,9 +50,7 @@ class TestInitSystemSystemdRoNetworkd(InitSystemSystemdBase):
""".format(infra.filepath("tests/init/systemd-factory"))
def test_run(self):
- self.start_emulator("squashfs", "zImage", "vexpress-v2p-ca9")
- self.check_init()
- self.check_network("eth0")
+ self.check_systemd("squashfs")
# This one must be executed on the target, to check that
# the factory feature works as expected
@@ -65,9 +67,7 @@ class TestInitSystemSystemdRwNetworkd(InitSystemSystemdBase):
"""
def test_run(self):
- self.start_emulator("ext2", "zImage", "vexpress-v2p-ca9")
- self.check_init()
- self.check_network("eth0")
+ self.check_systemd("ext2")
class TestInitSystemSystemdRoIfupdown(InitSystemSystemdBase):
@@ -80,9 +80,7 @@ class TestInitSystemSystemdRoIfupdown(InitSystemSystemdBase):
"""
def test_run(self):
- self.start_emulator("squashfs", "zImage", "vexpress-v2p-ca9")
- self.check_init()
- self.check_network("eth0")
+ self.check_systemd("squashfs")
class TestInitSystemSystemdRwIfupdown(InitSystemSystemdBase):
@@ -94,9 +92,7 @@ class TestInitSystemSystemdRwIfupdown(InitSystemSystemdBase):
"""
def test_run(self):
- self.start_emulator("ext2", "zImage", "vexpress-v2p-ca9")
- self.check_init()
- self.check_network("eth0")
+ self.check_systemd("ext2")
class TestInitSystemSystemdRoFull(InitSystemSystemdBase):
@@ -125,9 +121,7 @@ class TestInitSystemSystemdRoFull(InitSystemSystemdBase):
"""
def test_run(self):
- self.start_emulator("squashfs", "zImage", "vexpress-v2p-ca9")
- self.check_init()
- self.check_network("eth0")
+ self.check_systemd("squashfs")
class TestInitSystemSystemdRwFull(InitSystemSystemdBase):
@@ -155,6 +149,4 @@ class TestInitSystemSystemdRwFull(InitSystemSystemdBase):
"""
def test_run(self):
- self.start_emulator("ext2", "zImage", "vexpress-v2p-ca9")
- self.check_init()
- self.check_network("eth0")
+ self.check_systemd("ext2")
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-01-09 22:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-09 22:16 [Buildroot] [PATCH v6 1/4] package/dbus-broker: new package Norbert Lange
2022-01-09 22:16 ` [Buildroot] [PATCH v6 2/4] package/systemd: do not force dbus if dbus-broker is available Norbert Lange
2022-01-09 22:16 ` Norbert Lange [this message]
2022-07-27 15:04 ` [Buildroot] [PATCH v6 3/4] support/testsuite: de-duplicate the systemd runtime tests Arnout Vandecappelle
2022-01-09 22:16 ` [Buildroot] [PATCH v6 4/4] support/run-test: add test for systemd using dbus-broker Norbert Lange
2022-07-27 10:56 ` [Buildroot] [PATCH v6 1/4] package/dbus-broker: new package Arnout Vandecappelle
2022-07-27 13:47 ` Norbert Lange
2022-07-27 17:05 ` Arnout Vandecappelle
2022-07-27 17:31 ` Norbert Lange
2022-07-27 19:09 ` Arnout Vandecappelle
2022-07-27 19:24 ` Norbert Lange
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=20220109221650.777610-3-nolange79@gmail.com \
--to=nolange79@gmail.com \
--cc=buildroot@buildroot.org \
--cc=yann.morin.1998@free.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