From: Kamalesh Babulal Date: Thu, 3 Jul 2025 23:51:48 +0000 (+0530) Subject: ftests/cgroup: Add timeout to cgrulesengd X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5455ce91abc01981260c55b405b2f4d9d36769cf;p=thirdparty%2Flibcgroup.git ftests/cgroup: Add timeout to cgrulesengd cgrulesengd -n (nodaemon mode) runs indefinitely until it is terminated with SIGKILL. To handle this, introduce a 20-second timeout that is passed to __run(), which in turn calls subproc.kill() to terminate cgrulesengd once the timer expires. Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- diff --git a/tests/ftests/cgroup.py b/tests/ftests/cgroup.py index ba33d108..842dfeff 100644 --- a/tests/ftests/cgroup.py +++ b/tests/ftests/cgroup.py @@ -705,7 +705,7 @@ class Cgroup(object): 'supported' ) else: - Run.run(cmd, shell_bool=True) + Run.run(cmd, shell_bool=True, timeout=20) def start_cgrules(self, config): Cgroup.init_cgrules(config)