]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/084: skip test on non-systemd configuration
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 29 Nov 2023 09:41:44 +0000 (09:41 +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/084-sudo-cgcreate_systemd_scope_pid.py

index a418928b1fe2960b3e3fa77495f06fa429c1df38..a8822923f9b89961ad608f0d32cf5b9d4e78d4db 100755 (executable)
@@ -7,9 +7,10 @@
 # Author: Kamalesh Babulal <kamalesh.babulal@oracle.com>
 #
 
-from cgroup import Cgroup
 from process import Process
+from systemd import Systemd
 from libcgroup import Mode
+from cgroup import Cgroup
 from run import RunError
 import consts
 import ftests
@@ -35,6 +36,10 @@ def prereqs(config):
         result = consts.TEST_SKIPPED
         cause = 'This test requires the unified cgroup hierarchy'
 
+    if not Systemd.is_systemd_enabled():
+        result = consts.TEST_SKIPPED
+        cause = 'Systemd support not compiled in'
+
     return result, cause