aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2007-03-20 17:26:05 +0000
committerEwan Mellor <ewan@xensource.com>2007-03-20 17:26:05 +0000
commit282cd380d9da2e1fc7d57b2b49303e6e91dd5c7e (patch)
tree5074689a8d0cb734b06000668eea715a1c3f0a3b /tools/xm-test
parent9aa2765862058b235408be3f9392c9b538b8ecab (diff)
downloadxen-282cd380d9da2e1fc7d57b2b49303e6e91dd5c7e.tar.gz
xen-282cd380d9da2e1fc7d57b2b49303e6e91dd5c7e.tar.bz2
xen-282cd380d9da2e1fc7d57b2b49303e6e91dd5c7e.zip
Change the eyecatcher to be case-insensitive, so that "Internal error" is
detected. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Diffstat (limited to 'tools/xm-test')
-rw-r--r--tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py4
-rw-r--r--tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py b/tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py
index 3e9f0f2514..5d435e27c6 100644
--- a/tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py
+++ b/tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py
@@ -32,10 +32,10 @@ except ConsoleError, e:
status, output = traceCommand("xm block-attach %s phy:NOT-EXIST xvda1 w" % domain.getName())
eyecatcher = "Error"
-where = output.find(eyecatcher)
+where = re.compile(eyecatcher, re.IGNORECASE).search(output)
if status == 0:
FAIL("xm block-attach returned bad status, expected non 0, status is: %i" % status )
-elif where == -1:
+elif where is None:
FAIL("xm block-attach returned bad output, expected Error, output is: %s" % output )
try:
diff --git a/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py b/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py
index 802e101147..2fa482414a 100644
--- a/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py
+++ b/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py
@@ -31,10 +31,10 @@ except ConsoleError, e:
status, output = traceCommand("xm block-attach %s file:/dev/NOT-EXIST xvda1 w" % domain.getName())
eyecatcher = "Error"
-where = output.find(eyecatcher)
+where = re.compile(eyecatcher, re.IGNORECASE).search(output)
if status == 0:
FAIL("xm block-attach returned bad status, expected non 0, status is: %i" % status )
-elif where == -1:
+elif where is None:
FAIL("xm block-attach returned bad output, expected Error, output is: %s" % output )
try: