# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174411565 0
# Node ID 25bb1e7d236b94976ca4f460d0ef4bb40ae7c04a
# Parent a6d8885931174cf0f91a2a10551abd1ec413d17b
Change the eyecatcher to be case-insensitive, so that "Internal error" is
detected.
Signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py | 4
++--
tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py | 4
++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff -r a6d888593117 -r 25bb1e7d236b
tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py
--- a/tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py Tue Mar
20 16:55:29 2007 +0000
+++ b/tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py Tue Mar
20 17:26:05 2007 +0000
@@ -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 -r a6d888593117 -r 25bb1e7d236b
tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py
--- a/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py
Tue Mar 20 16:55:29 2007 +0000
+++ b/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py
Tue Mar 20 17:26:05 2007 +0000
@@ -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:
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|