提交 022d4c5b 编写于 作者: X Xu Tian

balloon_check: close sessions in the end of test

Signed-off-by: NXu Tian <xutian@redhat.com>
上级 f6994560
...@@ -127,8 +127,7 @@ class BallooningTest(MemoryBaseTest): ...@@ -127,8 +127,7 @@ class BallooningTest(MemoryBaseTest):
logging.info("Guest shutdown normally after balloon") logging.info("Guest shutdown normally after balloon")
qemu_quit_after_test = 1 qemu_quit_after_test = 1
if params.get("session_need_update", "no") == "yes": if params.get("session_need_update", "no") == "yes":
timeout = int(self.params.get("login_timeout", 360)) self.session = self.get_session(self.vm)
self.session = self.vm.wait_for_login(timeout=timeout)
if params.get("qemu_quit_after_sub_case", "no") == "yes": if params.get("qemu_quit_after_sub_case", "no") == "yes":
self.current_mmem = self.ori_mem self.current_mmem = self.ori_mem
self.current_gmem = self.ori_gmem self.current_gmem = self.ori_gmem
...@@ -380,5 +379,7 @@ def run(test, params, env): ...@@ -380,5 +379,7 @@ def run(test, params, env):
quit_after_test = balloon_test.run_ballooning_test(expect_mem, tag) quit_after_test = balloon_test.run_ballooning_test(expect_mem, tag)
if quit_after_test: if quit_after_test:
return return
try:
balloon_test.reset_memory() balloon_test.reset_memory()
finally:
balloon_test.close_sessions()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册