From e2da3dcc8d136f52482ddf368433d10fda72cbb4 Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Tue, 18 Jun 2024 12:26:28 +0530 Subject: [PATCH] ftests/071: Introduce delay before killing cgroup 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 Signed-off-by: Tom Hromatka --- tests/ftests/071-sudo-set_default_systemd_cgroup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/ftests/071-sudo-set_default_systemd_cgroup.py b/tests/ftests/071-sudo-set_default_systemd_cgroup.py index bbec4f74..1952dd50 100755 --- a/tests/ftests/071-sudo-set_default_systemd_cgroup.py +++ b/tests/ftests/071-sudo-set_default_systemd_cgroup.py @@ -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() # -- 2.47.3