From b6cc88141bdd866e64a0bcf926bf7af9fb532e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Thu, 14 Dec 2017 15:39:37 +0100 Subject: [PATCH] cpuflags: Improve the Test_temp cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's clean both "vm" and "clone" if they exists to avoid complex modifications required to switch from "vm" to "clone". Signed-off-by: Lukáš Doktor --- qemu/tests/cpuflags.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qemu/tests/cpuflags.py b/qemu/tests/cpuflags.py index f677345f..4a8c2286 100644 --- a/qemu/tests/cpuflags.py +++ b/qemu/tests/cpuflags.py @@ -510,9 +510,12 @@ def run(test, params, env): def clean(self): logging.info("cleanup") - if (hasattr(self, "vm")): - vm = getattr(self, "vm") + vm = getattr(self, "vm", None) + if vm: vm.destroy(gracefully=False) + clone = getattr(self, "clone", None) + if clone: + clone.destroy(gracefully=False) # 1) -cpu ?model class test_qemu_cpu_model(MiniSubtest): -- GitLab