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] [xen-unstable] xm: Fix control characters causing xm tes

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xm: Fix control characters causing xm tests to fail.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Aug 2007 05:30:30 -0700
Delivery-date: Tue, 07 Aug 2007 05:29:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1186404135 -3600
# Node ID 11b70c3d2194237f63a4301ec1fc2572283c0a6b
# Parent  c2d4efc2c8f9c091e24688adc18732863d615afa
xm: Fix control characters causing xm tests to fail.

On my FC7 installation some of the test in the xm test suite fail for
no apparent reason. The problem is that the python 'readline' module
puts out control characters that confuse code that parses the output
of some of the xm commands that are being run. The readline module
dumps those characters upon import. The attached patch works around
this problem.

Here's what I get in out.txt when doing 'python 2>&1 | tee out.txt'
and 'import readline' on the python command line:

Python 2.5 (r25:51908, Apr 10 2007, 10:29:13)
[GCC 4.1.2 20070403 (Red Hat 4.1.2-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
[[?1034h>>> >>>

The characters before the '>>>' above are those printed by that
version of 'readline' and remain invisible on the screen but appear in
the file and confuse the xm test suite parser.

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
---
 tools/python/xen/xm/main.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r c2d4efc2c8f9 -r 11b70c3d2194 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Mon Aug 06 13:39:20 2007 +0100
+++ b/tools/python/xen/xm/main.py       Mon Aug 06 13:42:15 2007 +0100
@@ -25,7 +25,6 @@ import cmd
 import cmd
 import os
 import pprint
-import readline
 import shlex
 import sys
 import re
@@ -616,6 +615,7 @@ class Shell(cmd.Cmd):
 
     def preloop(self):
         cmd.Cmd.preloop(self)
+        import readline
         readline.set_completer_delims(' ')
 
     def default(self, line):

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xm: Fix control characters causing xm tests to fail., Xen patchbot-unstable <=