]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
ftests: Rework test 071 to use cgroup_write_systemd_default_cgroup()
authorTom Hromatka <tom.hromatka@oracle.com>
Wed, 24 May 2023 13:34:51 +0000 (07:34 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 3 Jul 2023 15:00:19 +0000 (09:00 -0600)
commit3f6d836851664576df8c9bb60edaab78b7be43b3
tree49514686ecbf1abeb048b84b960e9ca462745488
parent411f56daf116032584f76f630eb9705fbf8ac67a
ftests: Rework test 071 to use cgroup_write_systemd_default_cgroup()

cgroup_write_systemd_default_cgroup() populates libcgroup's /var/run
file with the default slice/scope.  No verification is done at the time
of writing.

cgroup_set_default_systemd_cgroup() reads the /var/run file and verifies
that it points to a valid path.  If so, it populates libcgroup's global
variable, systemd_default_cgroup.  systemd_default_cgroup is then used
in any subsequent building of libcgroup paths.

Previously, test 071 tested cgroup_set_default_systemd_cgroup() but it
didn't exercise cgroup_write_systemd_default_cgroup().  Rework test 071
to exercise the most likely combinations of writing/setting the default
path that a user would encounter.

-----------------------------------------------------------------
Test Results:
Run Date:                          May 24 07:32:54
Passed:                                  1 test(s)
Skipped:                                 0 test(s)
Failed:                                  0 test(s)
-----------------------------------------------------------------
Timing Results:
Test                                       Time (sec)
-----------------------------------------------------
setup                                            0.00
071-sudo-set_default_systemd_cgroup.py           4.67
teardown                                         0.00
-----------------------------------------------------
Total Run Time                                   4.67

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