aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2007-12-10 12:02:46 +0000
committerKeir Fraser <keir.fraser@citrix.com>2007-12-10 12:02:46 +0000
commit343a76fb58f414c04f8944b2910f7ba7cdeb3b56 (patch)
treecbb20871b0cafba910fe002c5cc6d7b1d26f2ff9 /tools/xm-test
parentd62bd07bf5e1769ed109d8ab65d4dbcf74a2e4a1 (diff)
downloadxen-343a76fb58f414c04f8944b2910f7ba7cdeb3b56.tar.gz
xen-343a76fb58f414c04f8944b2910f7ba7cdeb3b56.tar.bz2
xen-343a76fb58f414c04f8944b2910f7ba7cdeb3b56.zip
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>
Diffstat (limited to 'tools/xm-test')
-rw-r--r--tools/xm-test/tests/security-acm/10_security-acm_pol_update.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/xm-test/tests/security-acm/10_security-acm_pol_update.py b/tools/xm-test/tests/security-acm/10_security-acm_pol_update.py
index 914b84f38d..b85079de35 100644
--- a/tools/xm-test/tests/security-acm/10_security-acm_pol_update.py
+++ b/tools/xm-test/tests/security-acm/10_security-acm_pol_update.py
@@ -21,11 +21,20 @@ def checkLabel(labeldata, expected, domname):
FAIL("%s does not have '%s' label but '%s'." %
(domname, expected[2], labeldata[2]))
+if not isACMEnabled():
+ SKIP("Not running this test since ACM not enabled.")
+
testpolicy = "xm-test"
testlabel1 = "blue"
testlabel2 = "red"
testlabel3 = "green"
+# reset the policy - must work
+s, o = traceCommand('xm resetpolicy')
+if s:
+ FAIL("Could not reset the policy.")
+
+
s, o = traceCommand('xm resources | grep -E "^[phy|file|vlan]" ')
resnames = []
if o:
@@ -183,7 +192,7 @@ if label != 'ACM:xm-test:blue':
% label)
# Terminate blue domain
-domain_blue.stop()
+domain_blue.destroy()
# Update the system's policy. Should work and rename the green domain to GREEN
s, o = traceCommand('xm setpolicy ACM xm-test-update')