]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/088: skip test on non-systemd configuration
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 29 Nov 2023 09:44:51 +0000 (09:44 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 7 Dec 2023 15:58:13 +0000 (08:58 -0700)
Skip running the testcase, when compiled with --enable-systemd=no,
using Systemd.is_systemd_enabled().

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
tests/ftests/088-sudo-cgclassify_systemd_scope.py

index 6be897b78513bb5e0e55766b8cc5b255a6a64f60..21fdf221ca20c1a0d99e02328f5046e8e3835044 100755 (executable)
@@ -8,6 +8,7 @@
 #
 
 from process import Process
+from systemd import Systemd
 from cgroup import Cgroup
 from run import RunError
 import consts
@@ -31,6 +32,10 @@ def prereqs(config):
         result = consts.TEST_SKIPPED
         cause = 'This test cannot be run within a container'
 
+    if not Systemd.is_systemd_enabled():
+        result = consts.TEST_SKIPPED
+        cause = 'Systemd support not compiled in'
+
     return result, cause