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,10 +381,13 @@ def get_udev_service_path(unit_name):
|
|||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
||||||
def kill_all_io():
|
def kill_all_io(graceful=True):
|
||||||
# TERM signal should be used in preference to the KILL signal, since a
|
if graceful:
|
||||||
# process may install a handler for the TERM signal in order to perform
|
# TERM signal should be used in preference to the KILL signal, since a
|
||||||
# clean-up steps before terminating in an orderly fashion.
|
# process may install a handler for the TERM signal in order to perform
|
||||||
|
# clean-up steps before terminating in an orderly fashion.
|
||||||
|
TestRun.executor.run("killall -q --signal TERM dd fio blktrace")
|
||||||
|
time.sleep(3)
|
||||||
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 KILL dd fio blktrace")
|
TestRun.executor.run("killall -q --signal KILL dd fio blktrace")
|
||||||
|
Loading…
Reference in New Issue
Block a user