From 8c9c1a969f247d6a6ac8dc054afd4c9ce6874035 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sun, 7 Jun 2020 15:54:59 +0200 Subject: [PATCH] support/run-test: add test for systemd using dbus-broker Add four new tests for systemd (rw and ro in each case): - use dbus-broker instead of the original dbus - use the original dbus, with dbus-broker installed The first two extend the existing TestInitSystemSystemdRoIfupdown test, by just enabling dbus-broker; the second ones extend this further, by explicitly enabling the original dbus. Presence of the original dbus and dbus-broker on the same system is valid: the original dbus is used as the system bus daemon, while dbus-broker is used for (some of) the session bus(es). We do not test the session bus for now, but the new test ensures the system bus daemon is not impacted by the presence of dbus-broker. Note: the 'full' test-case enables all systemd options, and some of them do pull the original dbus package, so we can't use that to test the integration of dbus-broker; instead, we extend the ifupdown case, which does not enable the original dbus. Signed-off-by: Yann E. MORIN Cc: Norbert Lange --- support/testing/tests/init/test_systemd.py | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/support/testing/tests/init/test_systemd.py b/support/testing/tests/init/test_systemd.py index 371be4ad7d..2b3888dfdd 100644 --- a/support/testing/tests/init/test_systemd.py +++ b/support/testing/tests/init/test_systemd.py @@ -86,6 +86,20 @@ class TestInitSystemSystemdRoIfupdown(InitSystemSystemdBase): self.check_network("eth0") +class TestInitSystemSystemdRoIfupdownDbusbroker(TestInitSystemSystemdRoIfupdown): + config = TestInitSystemSystemdRoIfupdown.config + \ + """ + BR2_PACKAGE_DBUS_BROKER=y + """ + + +class TestInitSystemSystemdRoIfupdownDbusbrokerDbus(TestInitSystemSystemdRoIfupdownDbusbroker): + config = TestInitSystemSystemdRoIfupdownDbusbroker.config + \ + """ + BR2_PACKAGE_DBUS=y + """ + + class TestInitSystemSystemdRwIfupdown(InitSystemSystemdBase): config = InitSystemSystemdBase.config + \ """ @@ -101,6 +115,20 @@ class TestInitSystemSystemdRwIfupdown(InitSystemSystemdBase): self.check_network("eth0") +class TestInitSystemSystemdRwIfupdownDbusbroker(TestInitSystemSystemdRwIfupdown): + config = TestInitSystemSystemdRwIfupdown.config + \ + """ + BR2_PACKAGE_DBUS_BROKER=y + """ + + +class TestInitSystemSystemdRwIfupdownDbusbrokerDbus(TestInitSystemSystemdRwIfupdownDbusbroker): + config = TestInitSystemSystemdRwIfupdownDbusbroker.config + \ + """ + BR2_PACKAGE_DBUS=y + """ + + class TestInitSystemSystemdRoFull(InitSystemSystemdBase): config = InitSystemSystemdBase.config + \ """