aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2013-01-31 13:56:04 +0100
committerDavid Sommerseth <davids@redhat.com>2013-01-31 13:56:04 +0100
commit723f004a951bb2168b1975052e1ca3e99cbee17f (patch)
treea17770011132487deb4ea6f1331200f1df3ebe61
parent9783d4ddae52dff0257259e42439d21377572b18 (diff)
downloadrteval-723f004a951bb2168b1975052e1ca3e99cbee17f.tar.gz
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 <davids@redhat.com>
-rw-r--r--rteval/modules/loads/hackbench.py9
1 files changed, 6 insertions, 3 deletions
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)