提交 67af754c 编写于 作者: T Tingting Mao

qemu_img: move the sleep function after getting pid

Move the sleep function after getting pid,
or 'qemu-img rebase' can not recieve the signal before exit.
Signed-off-by: NTingting Mao <timao@redhat.com>
上级 17d5d77e
......@@ -187,12 +187,12 @@ def run(test, params, env):
logging.info("Send signal to qemu-img")
end_time = time.time() + timeout
while time.time() < end_time:
time.sleep(1)
pid = process.system_output("pidof qemu-img",
ignore_status=True,
verbose=False).decode().strip()
if bool(pid):
break
time.sleep(1)
try:
os.kill(int(pid), signal.SIGUSR1)
except Exception as error:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册