diff --git a/tools/xm-test/tests/block-create/11_block_attach_shared_dom0.py b/tools/xm-test/tests/block-create/11_block_attach_shared_dom0.py index adf7ca5ea5..f2e5ca7d64 100644 --- a/tools/xm-test/tests/block-create/11_block_attach_shared_dom0.py +++ b/tools/xm-test/tests/block-create/11_block_attach_shared_dom0.py @@ -34,3 +34,5 @@ try: FAIL("Bug #331: Started a DomU with write access to a rw mounted block device") except DomainError, e: s, o = traceCommand("umount mnt") + +domain.destroy() diff --git a/tools/xm-test/tests/block-create/12_block_attach_shared_domU.py b/tools/xm-test/tests/block-create/12_block_attach_shared_domU.py index c0ce5bee8a..07cf56c373 100644 --- a/tools/xm-test/tests/block-create/12_block_attach_shared_domU.py +++ b/tools/xm-test/tests/block-create/12_block_attach_shared_domU.py @@ -20,8 +20,11 @@ except DomainError, e: FAIL("Unable to start domain") try: - dom2.start() - dom1.destroy() - FAIL("Bug #331: Started a DomU with write access to an in-use block device") -except DomainError, e: + try: + dom2.start() + FAIL("Bug #331: Started a DomU with write access to an in-use block device") + except DomainError, e: + pass +finally: dom1.destroy() + dom2.destroy()