diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2018-03-04 18:06:17 +0100 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2018-03-04 21:10:23 +0100 |
commit | 69781ebb509c835cad7b6cd12ea37cb8296fb64d (patch) | |
tree | 932f1576f7c2726469f5ab976e2f65bebcc6e7dd /support/testing/tests/init/test_systemd.py | |
parent | 6e5df928539efd424a381f3434fe5b9da1f2dffa (diff) | |
download | buildroot-69781ebb509c835cad7b6cd12ea37cb8296fb64d.tar.gz buildroot-69781ebb509c835cad7b6cd12ea37cb8296fb64d.zip |
support/tests: enhance the runtime systemd tests
Recent systemd bump has broken DBus dameon and DBus applications can no
longer find the daemon. So we want to catch those kind of failures
early.
We also want to check that the system as a whole is stable: no unit
should be failed.
Finally, ensure that we can read the jounrnal, even when we are doing our
tricks on read-only systems.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'support/testing/tests/init/test_systemd.py')
-rw-r--r-- | support/testing/tests/init/test_systemd.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/support/testing/tests/init/test_systemd.py b/support/testing/tests/init/test_systemd.py index 48fac1490f..a324ba8569 100644 --- a/support/testing/tests/init/test_systemd.py +++ b/support/testing/tests/init/test_systemd.py @@ -21,6 +21,18 @@ class InitSystemSystemdBase(InitSystemBase): def check_init(self): super(InitSystemSystemdBase, self).check_init("/lib/systemd/systemd") + # Test all units are OK + output, _ = self.emulator.run("systemctl --no-pager --failed --no-legend") + self.assertEqual(len(output), 0) + + # Test we can reach the DBus daemon + _, exit_code = self.emulator.run("busctl --no-pager") + self.assertEqual(exit_code, 0) + + # Test we can read at least one line from the journal + output, _ = self.emulator.run("journalctl --no-pager --lines 1 --quiet") + self.assertEqual(len(output), 1) + class TestInitSystemSystemdRoNetworkd(InitSystemSystemdBase): config = InitSystemSystemdBase.config + \ |