[3/3] testsuite: Detect systemd services ordering cycle

Message ID 20240816144333.27467-4-ubely@ilbers.de
State Accepted, archived
Headers show
Series [1/3] Revert "expand-on-first-boot: Ensure that /tmp is writable" | expand

Commit Message

Uladzimir Bely Aug. 16, 2024, 2:38 p.m. UTC
This allows to recognize any cyclic dependencies between
systemd services.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 testsuite/cibuilder.py | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index 3f77cd42..1e2c265f 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -556,6 +556,8 @@  class CIBuilder(Test):
         # the printk of recipes-kernel/example-module
         module_output = b'Just an example'
         resize_output = None
+        # systemd service ordering cycle
+        ordering_cycle = b'Found ordering cycle'
         image_fstypes, wks_file, bbdistro = CIUtils.getVars(
             'IMAGE_FSTYPES', 'WKS_FILE', 'DISTRO', target=multiconfig
         )
@@ -582,6 +584,9 @@  class CIBuilder(Test):
                 else:
                     rc = 2
                     self.log.error("No example module output while expected")
+                if ordering_cycle in data:
+                    rc = 3
+                    self.log.error("Systemd services ordering cycle detected")
         return rc
 
     def vm_dump_dict(self, vm):