[xen-unstable] xm-test: Don't run security test if ACM is not enabled.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen-unstable] xm-test: Don't run security test if ACM is not enabled.

Xen patchbot-unstable
# HG changeset patch
# User Keir Fraser <[hidden email]>
# Date 1197288166 0
# Node ID d9cd502d8df23566884bbb47376b67c47e4395a7
# Parent  40812c9d96e73f0b630384117b4a983affd2cff9
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 <[hidden email]>
---
 tools/xm-test/tests/security-acm/10_security-acm_pol_update.py |   11 +++++++++-
 1 files changed, 10 insertions(+), 1 deletion(-)

diff -r 40812c9d96e7 -r d9cd502d8df2 tools/xm-test/tests/security-acm/10_security-acm_pol_update.py
--- a/tools/xm-test/tests/security-acm/10_security-acm_pol_update.py Mon Dec 10 11:55:55 2007 +0000
+++ b/tools/xm-test/tests/security-acm/10_security-acm_pol_update.py Mon Dec 10 12:02:46 2007 +0000
@@ -21,11 +21,20 @@ def checkLabel(labeldata, expected, domn
         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')

_______________________________________________
Xen-changelog mailing list
[hidden email]
http://lists.xensource.com/xen-changelog