From: Kamalesh Babulal Date: Wed, 29 Nov 2023 09:41:44 +0000 (+0000) Subject: ftests/084: skip test on non-systemd configuration X-Git-Tag: v3.2.0~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10e55c04ba77886785f5cdb866658dbf1edccc13;p=thirdparty%2Flibcgroup.git ftests/084: skip test on non-systemd configuration Skip running the testcase, when compiled with --enable-systemd=no, using Systemd.is_systemd_enabled(). Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- diff --git a/tests/ftests/084-sudo-cgcreate_systemd_scope_pid.py b/tests/ftests/084-sudo-cgcreate_systemd_scope_pid.py index a418928b..a8822923 100755 --- a/tests/ftests/084-sudo-cgcreate_systemd_scope_pid.py +++ b/tests/ftests/084-sudo-cgcreate_systemd_scope_pid.py @@ -7,9 +7,10 @@ # Author: Kamalesh Babulal # -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