ia64/xen-unstable
changeset 14488:25bb1e7d236b
Change the eyecatcher to be case-insensitive, so that "Internal error" is
detected.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
detected.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author | Ewan Mellor <ewan@xensource.com> |
---|---|
date | Tue Mar 20 17:26:05 2007 +0000 (2007-03-20) |
parents | a6d888593117 |
children | 9f9d04ce1eaf |
files | tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py |
line diff
1.1 --- a/tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py Tue Mar 20 16:55:29 2007 +0000 1.2 +++ b/tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py Tue Mar 20 17:26:05 2007 +0000 1.3 @@ -32,10 +32,10 @@ except ConsoleError, e: 1.4 1.5 status, output = traceCommand("xm block-attach %s phy:NOT-EXIST xvda1 w" % domain.getName()) 1.6 eyecatcher = "Error" 1.7 -where = output.find(eyecatcher) 1.8 +where = re.compile(eyecatcher, re.IGNORECASE).search(output) 1.9 if status == 0: 1.10 FAIL("xm block-attach returned bad status, expected non 0, status is: %i" % status ) 1.11 -elif where == -1: 1.12 +elif where is None: 1.13 FAIL("xm block-attach returned bad output, expected Error, output is: %s" % output ) 1.14 1.15 try:
2.1 --- a/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py Tue Mar 20 16:55:29 2007 +0000 2.2 +++ b/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py Tue Mar 20 17:26:05 2007 +0000 2.3 @@ -31,10 +31,10 @@ except ConsoleError, e: 2.4 2.5 status, output = traceCommand("xm block-attach %s file:/dev/NOT-EXIST xvda1 w" % domain.getName()) 2.6 eyecatcher = "Error" 2.7 -where = output.find(eyecatcher) 2.8 +where = re.compile(eyecatcher, re.IGNORECASE).search(output) 2.9 if status == 0: 2.10 FAIL("xm block-attach returned bad status, expected non 0, status is: %i" % status ) 2.11 -elif where == -1: 2.12 +elif where is None: 2.13 FAIL("xm block-attach returned bad output, expected Error, output is: %s" % output ) 2.14 2.15 try: