diff --git a/test_utils/os_utils.py b/test_utils/os_utils.py index c0bb0e2..e9c01f1 100644 --- a/test_utils/os_utils.py +++ b/test_utils/os_utils.py @@ -381,10 +381,13 @@ def get_udev_service_path(unit_name): return path -def kill_all_io(): - # 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 - # clean-up steps before terminating in an orderly fashion. +def kill_all_io(graceful=True): + if graceful: + # 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 + # 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") time.sleep(3) TestRun.executor.run("killall -q --signal KILL dd fio blktrace")