From e51cfe0ab138fb48ed045b33b4d4796c85f55b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Thu, 24 Jan 2019 16:14:27 +0100 Subject: [PATCH] utils.process: Use actual duration instead of timeout value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The interrupted message might be slightly misleading as there are several timeouts before declaring the process interrupted and the wait might not be issued immediatelly so let's use the (time - start_time) value instead of timeout value. Signed-off-by: Lukáš Doktor --- avocado/utils/process.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/avocado/utils/process.py b/avocado/utils/process.py index e0ec8a26..049efa13 100644 --- a/avocado/utils/process.py +++ b/avocado/utils/process.py @@ -822,7 +822,8 @@ class SubProcess(object): the specified timeout. """ def nuke_myself(): - self.result.interrupted = "timeout after %ss" % timeout + self.result.interrupted = ("timeout after %ss" + % (time.time() - self.start_time)) try: kill_process_tree(self.get_pid(), sig, timeout=1) except Exception: -- GitLab