Skip to content

Commit

Permalink
storage_benchmark: Exe suffix is needed when killing process on windows
Browse files Browse the repository at this point in the history
A full process name is required for the TASKKILL command, e.g.
TASKKILL /F /IM fio.exe /T

Signed-off-by: Zhenchao Liu <[email protected]>
  • Loading branch information
zhencliu committed Nov 5, 2024
1 parent 45d69e3 commit a345b0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions provider/storage_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ def __kill_procs(self, session):
:param session: vm session
:type session: aexpect.client.ShellSession
"""
LOG_JOB.info("Killing all %s processes by force.", self.name)
session.cmd_output(self._kill_pid % self.name, timeout=120)
proc_name = self.name if self.os_type == "linux" else f"{self.name}.exe"
LOG_JOB.info("Killing all %s processes by force.", proc_name)
session.cmd_output(self._kill_pid % proc_name, timeout=120)

def __remove_env_files(self, session, timeout=300):
"""
Expand Down

0 comments on commit a345b0e

Please sign in to comment.