]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
ftests: Add cgcreate systemd scope support
authorTom Hromatka <tom.hromatka@oracle.com>
Tue, 4 Apr 2023 22:31:51 +0000 (22:31 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 20 Apr 2023 20:16:00 +0000 (14:16 -0600)
commit5fc8e77fc70667a02af20ad62876f715d96c6241
tree1ff9795950782d105b7c08aea09b5161bc7a3dfc
parentd789745d786ac30ec3fdba0525da003abcef120f
ftests: Add cgcreate systemd scope support

Add support for creating systemd scopes via the cgcreate command
line tool.

Python's subprocess.Popen.communicate() will not return until the
spawned process and all of its children finish running.  This will
cause a cgcreate of a scope to hang because libcgroup creates an
idle process in the newly-created scope.  Add a timeout to the run()
method so that it can complete even when a child process remains.

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