direct-io.hg

changeset 7778:a06405d12a10

This test was failing for he wrong reason. Calls to block-attach after the
first *should* report failure, so the test should not fail because of this.
The test now fails because multiple calls to block-attach seem to detach the
block devicem, which is wrong.

Signed-off-by: Dan Smith <danms@us.ibm.com>
author dan@guaranine.beaverton.ibm.com
date Sat Nov 12 18:25:12 2005 +0100 (2005-11-12)
parents fa237e03d3e7
children 55af8b55abd8
files tools/xm-test/tests/block-create/04_block_attach_device_repeatedly_pos.py
line diff
     1.1 --- a/tools/xm-test/tests/block-create/04_block_attach_device_repeatedly_pos.py	Sat Nov 12 17:51:14 2005 +0100
     1.2 +++ b/tools/xm-test/tests/block-create/04_block_attach_device_repeatedly_pos.py	Sat Nov 12 18:25:12 2005 +0100
     1.3 @@ -38,11 +38,13 @@ except ConsoleError, e:
     1.4      
     1.5  for i in range(10):
     1.6  	status, output = traceCommand("xm block-attach %s phy:ram1 sdb1 w" % domain.getName())
     1.7 -	if status != 0:
     1.8 -        	FAIL("xm block-attach returned invalid %i != 0" % status)
     1.9 +        if i == 0 and status != 0:
    1.10 +            FAIL("xm block attach returned invalid %i != 0" % status)
    1.11 +	if i > 0 and status == 0:
    1.12 +            FAIL("xm block-attach (repeat) returned invalid %i > 0" % status)
    1.13  	run = console.runCmd("cat /proc/partitions")
    1.14  	if not re.search("sdb1", run['output']):
    1.15 -		FAIL("Device is not actually attached to domU")
    1.16 +            FAIL("Device is not actually attached to domU")
    1.17  
    1.18  # Close the console
    1.19  console.closeConsole()