]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/cgroup: Add timeout to cgrulesengd
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 3 Jul 2025 23:51:48 +0000 (05:21 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 14 Jul 2025 17:10:42 +0000 (11:10 -0600)
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 <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
tests/ftests/cgroup.py

index ba33d108f9ed839079be7c962da5a9a1227f9829..842dfeff831a301018fb96d3f01b9db06be1b69b 100644 (file)
@@ -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)