direct-io.hg

changeset 8372:d8c7f144ca54

Fix block_attach_shared tests. When the sharing check succeeds, the domain
is created but left paused, so it is necessary to destroy the domain afterwards,
whether the test succeeded or failed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Thu Dec 15 13:49:07 2005 +0000 (2005-12-15)
parents c28794c159c1
children 237b2a4d2499
files tools/xm-test/tests/block-create/11_block_attach_shared_dom0.py tools/xm-test/tests/block-create/12_block_attach_shared_domU.py
line diff
     1.1 --- a/tools/xm-test/tests/block-create/11_block_attach_shared_dom0.py	Thu Dec 15 13:39:16 2005 +0000
     1.2 +++ b/tools/xm-test/tests/block-create/11_block_attach_shared_dom0.py	Thu Dec 15 13:49:07 2005 +0000
     1.3 @@ -34,3 +34,5 @@ try:
     1.4      FAIL("Bug #331: Started a DomU with write access to a rw mounted block device")
     1.5  except DomainError, e:
     1.6      s, o = traceCommand("umount mnt")
     1.7 +
     1.8 +domain.destroy()
     2.1 --- a/tools/xm-test/tests/block-create/12_block_attach_shared_domU.py	Thu Dec 15 13:39:16 2005 +0000
     2.2 +++ b/tools/xm-test/tests/block-create/12_block_attach_shared_domU.py	Thu Dec 15 13:49:07 2005 +0000
     2.3 @@ -20,8 +20,11 @@ except DomainError, e:
     2.4      FAIL("Unable to start domain")
     2.5  
     2.6  try:
     2.7 -    dom2.start()
     2.8 +    try:
     2.9 +        dom2.start()
    2.10 +        FAIL("Bug #331: Started a DomU with write access to an in-use block device")
    2.11 +    except DomainError, e:
    2.12 +        pass
    2.13 +finally:
    2.14      dom1.destroy()
    2.15 -    FAIL("Bug #331: Started a DomU with write access to an in-use block device")
    2.16 -except DomainError, e:
    2.17 -    dom1.destroy()
    2.18 +    dom2.destroy()