test-framework: Make kill_all_io faster
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
This commit is contained in:
parent
f59fc28ef2
commit
0edba4f01b
@ -381,12 +381,15 @@ def get_udev_service_path(unit_name):
|
|||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
||||||
def kill_all_io():
|
def kill_all_io(graceful=True):
|
||||||
|
if graceful:
|
||||||
# TERM signal should be used in preference to the KILL signal, since a
|
# TERM signal should be used in preference to the KILL signal, since a
|
||||||
# process may install a handler for the TERM signal in order to perform
|
# process may install a handler for the TERM signal in order to perform
|
||||||
# clean-up steps before terminating in an orderly fashion.
|
# clean-up steps before terminating in an orderly fashion.
|
||||||
TestRun.executor.run("killall -q --signal TERM dd fio blktrace")
|
TestRun.executor.run("killall -q --signal TERM dd fio blktrace")
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
TestRun.executor.run("killall -q --signal TERM dd fio blktrace")
|
||||||
|
time.sleep(3)
|
||||||
TestRun.executor.run("killall -q --signal KILL dd fio blktrace")
|
TestRun.executor.run("killall -q --signal KILL dd fio blktrace")
|
||||||
TestRun.executor.run("kill -9 `ps aux | grep -i vdbench.* | awk '{ print $2 }'`")
|
TestRun.executor.run("kill -9 `ps aux | grep -i vdbench.* | awk '{ print $2 }'`")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user