Skip to content

Commit f3e34d6

Browse files
ftests/run.py: terminate processes that exceed timeout
Some commands, like 'cgrulesengd' in non-daemon mode, continue running until explicitly terminated. Currently, we catch exceptions for timeouts but do not terminate the lingering process. This patch ensures that such processes are properly killed after the timeout. Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
1 parent 86a3718 commit f3e34d6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/ftests/run.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ def __run(command, shell_bool, timeout):
4949
ret = -1
5050
else:
5151
ret = 0
52+
53+
# kill the process, that has exceeded the timeout
54+
subproc.kill()
5255
else:
5356
out, err = subproc.communicate()
5457
ret = subproc.returncode

0 commit comments

Comments
 (0)