From: Stefan Berger Subject: [PATCH] [Xm-TEST] Don't run security test if ACM is not enabled Date: Mon, 10 Dec 2007 06:57:49 -0500 Message-ID: <1197287869.5903.4.camel@941e-2.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-VZDhUVjcmr6RfHIu7HgP" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org --=-VZDhUVjcmr6RfHIu7HgP Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-VZDhUVjcmr6RfHIu7HgP Content-Disposition: attachment; filename=xm_test_dont_run_security_test_10_without_acm.diff Content-Type: text/x-patch; name=xm_test_dont_run_security_test_10_without_acm.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/tools/xm-test/tests/security-acm/10_security-acm_pol_update.py =================================================================== --- root.orig/xen-unstable.hg/tools/xm-test/tests/security-acm/10_security-acm_pol_update.py +++ root/xen-unstable.hg/tools/xm-test/tests/security-acm/10_security-acm_pol_update.py @@ -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') --=-VZDhUVjcmr6RfHIu7HgP Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-VZDhUVjcmr6RfHIu7HgP--