From 723f004a951bb2168b1975052e1ca3e99cbee17f Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Thu, 31 Jan 2013 13:56:04 +0100 Subject: hackbench: Adjusted the clean-up after running the load runs have completed Ensure that hackbench really is stopped before continuing further. Signed-off-by: David Sommerseth --- rteval/modules/loads/hackbench.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'rteval') diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py index 0985414..12acbe7 100644 --- a/rteval/modules/loads/hackbench.py +++ b/rteval/modules/loads/hackbench.py @@ -26,7 +26,7 @@ # import sys, os, time, glob, subprocess, errno -from signal import SIGTERM, SIGKILL +from signal import SIGKILL from rteval.modules.loads import CommandLineLoad from rteval.Log import Log @@ -113,8 +113,11 @@ class Hackbench(CommandLineLoad): if self._donotrun: return - if self.__hbproc.poll() == None: - os.kill(self.__hbproc.pid, SIGKILL) + while self.__hbproc.poll() == None: + self._log(Log.DEBUG, "Forcing it to stop") + self.__hbproc.send_signal(SIGKILL) + if self.__hbproc.poll() == None: + time.sleep(2) self.__hbproc.wait() os.close(self.__nullfp) -- cgit