From 6cfda328bf2c866d51b24d112c263026ca68e8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 27 Sep 2019 22:29:16 +0200 Subject: [PATCH] tests: add workaround for Whonix re-starting VMs Workaround for https://phabricator.whonix.org/T930 For now, unregister all the VMs to be killed manually. --- qubes/tests/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qubes/tests/__init__.py b/qubes/tests/__init__.py index 334f85e2..8c1ef5ae 100644 --- a/qubes/tests/__init__.py +++ b/qubes/tests/__init__.py @@ -902,6 +902,18 @@ class SystemTestCase(QubesTestCase): vms = list(vms) if not vms: return + # workaround for https://phabricator.whonix.org/T930 + # unregister all the VMs from sys-whonix, otherwise it will start them + # again (possibly in further test) + if 'whonix' in self.app.default_netvm.name: + for vm in vms: + try: + self.loop.run_until_complete( + self.app.default_netvm.run_service_for_stdio( + 'whonix.NewStatus+{}_shutdown'.format(vm.name))) + except: + pass + # first kill all the domains, to avoid side effects of changing netvm for vm in vms: try: