WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Remove looping from handling of xm domid. This command s

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Remove looping from handling of xm domid. This command should now work first
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 27 Nov 2005 02:24:10 +0000
Delivery-date: Sun, 27 Nov 2005 02:24:40 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 86a2e2645e40bb311600159062051369963c930c
# Parent  4f12ed3342dc105b0238a36352f35385dce86ff2
Remove looping from handling of xm domid.  This command should now work first
time after creation of a domain.  Have the getRunningDomains method detect
failure of the xm list command, as indicated by the error code.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 4f12ed3342dc -r 86a2e2645e40 tools/xm-test/lib/XmTestLib/Xm.py
--- a/tools/xm-test/lib/XmTestLib/Xm.py Sun Nov 27 00:59:37 2005
+++ b/tools/xm-test/lib/XmTestLib/Xm.py Sun Nov 27 01:01:42 2005
@@ -47,20 +47,13 @@
 def domid(name):
     status, output = traceCommand("xm domid " + name);
 
-    if re.search("Traceback", output):
-        print "*** xm domid failed with:"
-        print output
-        for i in range(0,10):
-            status, output = traceCommand("xm list")
-            status, output = traceCommand("xm domid " + name);
-            if not re.search("Traceback", output):
-                break
-        
+    if status != 0 or "Traceback" in output:
+        return -1
     try:
-        id = int(output);
+        return int(output)
     except:
-        id = -1;
-    return id;
+        raise XmError("xm domid failed", trace=output, status=status)
+
 
 def domname(id):
     status, output = traceCommand("xm domname " + str(id));
@@ -75,7 +68,7 @@
 
 def getRunningDomains():
     status, output = traceCommand("xm list");
-    if "Traceback" in output:
+    if status != 0 or "Traceback" in output:
         raise XmError("xm failed", trace=output, status=status)
     
     lines = output.splitlines();

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Remove looping from handling of xm domid. This command should now work first, Xen patchbot -unstable <=