From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Berger Subject: [PATCH] [Xm-TEST] Run tests with managed domains and fix of a bug related to 'xm domid' Date: Wed, 10 Jan 2007 16:48:24 -0500 Message-ID: <1168465704.25229.4.camel@lt2.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-1XJvWK0OvH0zyWjB8fB/" 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 Cc: ewan@xensource.com List-Id: xen-devel@lists.xenproject.org --=-1XJvWK0OvH0zyWjB8fB/ Content-Type: text/plain Content-Transfer-Encoding: 7bit I added a parameter '-md' to 'runtest.sh' for running the xm test suite in a mode where all created domains a created as xend-managed domains. This patch also fixes a problem related to calling 'xm domid' on a currently suspended domain if that domain is a managed domain. In that case a 'None' is returned by Xend, which I default to '-1'. Signed-off-by: Stefan Berger --=-1XJvWK0OvH0zyWjB8fB/ Content-Disposition: attachment; filename=xm-mgt-domain.diff Content-Type: text/x-patch; name=xm-mgt-domain.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/tools/xm-test/runtest.sh =================================================================== --- root.orig/xen-unstable.hg/tools/xm-test/runtest.sh +++ root/xen-unstable.hg/tools/xm-test/runtest.sh @@ -16,6 +16,7 @@ usage() { echo " -r : url of test results repository to use" echo " -s : just submit report " echo " -u : unsafe -- do not run the sanity checks before starting" + echo " -md : all created domains are xend-'managed' domains" echo " -h | --help : show this help" } @@ -218,11 +219,14 @@ run=yes unsafe=no GROUPENTERED=default +#Prepare for usage with ACM if [ -d /etc/xen/acm-security/policies ]; then cp -f tests/security-acm/xm-test-security_policy.xml \ /etc/xen/acm-security/policies fi +unset XM_MANAGED_DOMAINS + # Resolve options while [ $# -gt 0 ] do @@ -260,6 +264,10 @@ while [ $# -gt 0 ] unsafe=yes report=no ;; + -md) + echo "(use managed domains)" + export XM_MANAGED_DOMAINS=1 + ;; -h|--help) usage exit 0 Index: root/xen-unstable.hg/tools/xm-test/lib/XmTestLib/Xm.py =================================================================== --- root.orig/xen-unstable.hg/tools/xm-test/lib/XmTestLib/Xm.py +++ root/xen-unstable.hg/tools/xm-test/lib/XmTestLib/Xm.py @@ -49,6 +49,8 @@ def domid(name): if status != 0 or "Traceback" in output: return -1 + if output == "None": + return -1 try: return int(output) except: --=-1XJvWK0OvH0zyWjB8fB/ 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 --=-1XJvWK0OvH0zyWjB8fB/--