ia64/xen-unstable

changeset 16577:d9cd502d8df2

xm-test: Don't run security test if ACM is not enabled.

I forgot to put in the check to prevent this test case from running
when ACM is not compiled into Xen. I am resetting the policy so that
an update with the prepared policy can be done without changing that
policy's header to match the current policy's version.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Dec 10 12:02:46 2007 +0000 (2007-12-10)
parents 40812c9d96e7
children 4054cd60895b
files tools/xm-test/tests/security-acm/10_security-acm_pol_update.py
line diff
     1.1 --- a/tools/xm-test/tests/security-acm/10_security-acm_pol_update.py	Mon Dec 10 11:55:55 2007 +0000
     1.2 +++ b/tools/xm-test/tests/security-acm/10_security-acm_pol_update.py	Mon Dec 10 12:02:46 2007 +0000
     1.3 @@ -21,11 +21,20 @@ def checkLabel(labeldata, expected, domn
     1.4          FAIL("%s does not have '%s' label but '%s'." %
     1.5               (domname, expected[2], labeldata[2]))
     1.6  
     1.7 +if not isACMEnabled():
     1.8 +    SKIP("Not running this test since ACM not enabled.")
     1.9 +
    1.10  testpolicy = "xm-test"
    1.11  testlabel1 = "blue"
    1.12  testlabel2 = "red"
    1.13  testlabel3 = "green"
    1.14  
    1.15 +# reset the policy - must work
    1.16 +s, o = traceCommand('xm resetpolicy')
    1.17 +if s:
    1.18 +    FAIL("Could not reset the policy.")
    1.19 +
    1.20 +
    1.21  s, o = traceCommand('xm resources | grep -E "^[phy|file|vlan]" ')
    1.22  resnames = []
    1.23  if o:
    1.24 @@ -183,7 +192,7 @@ if label != 'ACM:xm-test:blue':
    1.25           % label)
    1.26  
    1.27  # Terminate blue domain
    1.28 -domain_blue.stop()
    1.29 +domain_blue.destroy()
    1.30  
    1.31  # Update the system's policy. Should work and rename the green domain to GREEN
    1.32  s, o = traceCommand('xm setpolicy ACM xm-test-update')