]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/071: Introduce delay before killing cgroup
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 18 Jun 2024 06:56:28 +0000 (12:26 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 20 Jun 2024 20:54:13 +0000 (14:54 -0600)
Fix the following issue:
071-sudo-set_default_systemd_cgroup.py - cgroup_delete_cgroup failed: 50016

Some older version of Kernel/Python combination, requires few jiffies to
sync the cgroup.procs list of process. Fix it by introducing 0.5 second
delay, before removing the cgroup.

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

index bbec4f746a65420eef368f09eed5915f1467e3eb..1952dd5097bf024b3dbc634d23b14fc1bac74314 100755 (executable)
@@ -94,6 +94,10 @@ def test(config):
         cause = '\n'.join(filter(None, [cause, tmp_cause]))
 
     Process.kill(config, pid)
+
+    # Allow the cgroup sync, on killed pid
+    time.sleep(0.5)
+
     cg.delete()
 
     #